Jump to content


A few HTML problems


5 replies to this topic

#1 Spreegem

    Young Padawan

  • Members
  • Pip
  • 4 posts
  • Gender:Male

Posted 02 April 2005 - 10:42 PM

I am having a problem aligning mt header image to the top and the left, there's a space in between the top, and the left before where the image is. I have 4 out of 5 columns set to a specified width, but they're not staying the same size, the middle column is 100% which is working just fine, but the other columns are not working correctly, unless text is in the other columns, they disappear. Also the table appears right next to my image unless I enter 5 blank lines. But then there is a gap inbetween my header image and the table. I'm just having alot of problem, and here's my current code.

<html>
<head>
<title>Space Baron</title>
<link rel="stylesheet" type="text/css" href="http://egames.servegame.com/space_game_1/includes/style.css" />
</head>

<body text="#FFFFFF">

<img border="0" src="images2/banner.jpg" width="780" height="120" alt="Space Baron Banner" align="left">
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="120" height="100%" valign="top" style="padding: 0px 6px 0px 0px">Navigation OMG TEXT</td>
    <td width="8" height="100%" valign="top"><font color="#000000">a</font></td>
    <td width="100%" height="100%" valign="top" style="padding: 0px 6px 0px 6px">&nbsp;&nbsp;&nbsp;&nbsp; MAIN CONTENT IN HERE</td>
    <td width="8" height="100%" valign="top"><font color="#000000">a</font></td>
    <td width="120" height="100%" valign="top" style="padding: 0px 0px 0px 6px">ADS WILL GO IN HERE</td>
  </tr>
</table>

</html>


#2 InFnit

    P2L Jedi

  • Members
  • PipPipPip
  • 822 posts
  • Interests:My interests are my:&lt;br&gt;&lt;br&gt;iidsite - http://iid.outer-heaven.net&lt;br&gt;iidblog - http://iid.outer-heaven.net/blog/&lt;br&gt;iidcommunity - http://iid.outer-heaven.net/forums/&lt;br&gt;P2L - http://www.pixel2life.com

Posted 02 April 2005 - 10:48 PM

Have a live example?

And remove the five lines and add a <br> or <br /> if you are using XHTML 1.0

Add
<style type="text/css">
body {
margin: 0;
}
</style> in the header tage to remove the gap at the top and left.

Don't give center column 100% width. Instead give the whole table either 100% or a fixed px size. Give the remainder columns their widths and leave the center width blank.

This should fix all your problems. Another idea is adding the banner into your table...

#3 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 02 April 2005 - 10:52 PM

To get rid of the gap between your header and table, make a new row on the top of the table and put the header in it. Tables are elements that are spaced out automatically from other elements.

#4 InFnit

    P2L Jedi

  • Members
  • PipPipPip
  • 822 posts
  • Interests:My interests are my:&lt;br&gt;&lt;br&gt;iidsite - http://iid.outer-heaven.net&lt;br&gt;iidblog - http://iid.outer-heaven.net/blog/&lt;br&gt;iidcommunity - http://iid.outer-heaven.net/forums/&lt;br&gt;P2L - http://www.pixel2life.com

Posted 02 April 2005 - 10:57 PM

InFnit said:

Another idea is adding the banner into your table...

I thought I said that ^_^

#5 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 02 April 2005 - 11:04 PM

InFnit, on Apr 2 2005, 11:57 PM, said:

InFnit said:

Another idea is adding the banner into your table...

I thought I said that ^_^
I was just expanding on that ;)

#6 Spreegem

    Young Padawan

  • Members
  • Pip
  • 4 posts
  • Gender:Male

Posted 02 April 2005 - 11:04 PM

Ok, Thanks That works great.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users