Hello,
How can I create a table that goes all the way to the top of the page. Like the one on this site. that image is at the very top of the page.
Thanks
Moderator
From: Deland, FL
Registered: 2005-10-25
Posts: 1271
I've been thanked 20 times.
Offline
This site doesn't use tables to control the layout (a practice that is no longer used by professionals). It uses CSS, or Cascading Style Sheets, to control how everything is positioned.
There is, of course, an easy way to do it using tables and CSS, but if you are trying to design a webpage, I very much recommend learning CSS.
Google "CSS Tutorials" - there's tons out there that can help you!
Hello,
Thanks for the reply.
I have read some of CSS but I still cannot find a way to get that to the top..
Would the CSS be something like this:
}
placing {
top: 100%;
position: absolute;
left: 100%;
}
I got it!!!
Here is the code:
<title>Untitled Document</title>
<style type="text/css">
body
{
background-image:
url('images/bk.jpg');
background-repeat: repeat-x
}
#placing {
position: absolute;
top: 0;
right: 0;
left: 0;
}
.style1 {color: #FFFFFF}
</style>
</head>
<body bgcolor="#003399">
<DIV ID="placing">
<img src="images/logo2.jpg" alt="lOGO" width="382" height="101" /> </DIV>
</body>
</html>
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
Actually you do not need the #placing.
If this is the first item on the page it will automatically be at the top. The positioning you have now will work if the image is not the first thing listed.
Can you supply a link to the page where we can take a look at it? Might enable us to help you and or others better.
Edit,
mark wrote:
This site doesn't use tables
hehe, have you looked at the code for the top.
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
Here it is:
http://201.199.73.10/testbk.html
thanks
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
Where are you wanting it? Centered on the page, left as it is now or right?
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
Top and left
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
By default, left is where it would automatically be placed. You would not need the css positioning.
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
So, what I have there on my code I could leave it like that?
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
Yes, you could.
Another point with the styling you have for the 'body'
You should always declare a background color even if you are using an image.
You can also shorthand the styling.
Code: css
body {background:#00F url('images/bk.jpg') repeat-x; }
color,
image,
repeat direction
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
If you decide to keep the placing id remove the right:0; not needed at all.
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
Thanks for the information.
One last thing...What do you think of the logo??? I just changed it.... Thanks ( site is for real state )
http://201.199.73.10/testbk.html
Thanks
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
Looks good, hard to really tell if it is fitting for the site, not having anything else to go by. 
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
I know.
I am re-designing the site.
The actual site is www.crlandmarket.com
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
That image should fall right into line 
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
This is awesome!
I just started reading about DIV on the internet and you can pretty much place these blocks where ever you want on the page. A LOT easier than working with tables.
Once I'm done with the site it would come out really good due to this. 
Thanks!!!
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2177
I've been thanked 91 times.
Offline
allan16 wrote:
This is awesome!
I just started reading about DIV on the internet and you can pretty much place these blocks where ever you want on the page. A LOT easier than working with tables.
Once I'm done with the site it would come out really good due to this.
Thanks!!!
wooo hoo another has seen the beauty of CSS and table-less design,

As TA says, you have just been thanked for your enthusiasm 
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems
Member
From: South Africa
Registered: 2006-07-21
Posts: 282
I've been thanked 7 times.
Offline
allan16 wrote:
How can I create a table that goes all the way to the top of the page. Like the one on this site. that image is at the very top of the page.
Thanks
Whether using tables or divs, to get anything exactly at the top of he page you need to specify that the page margin is "0". By default there are a few pixels of margin, so if you have the following css...
Code: css
body{
margin-top: 0px;
}
....things will display exactly at the top of the page, and there is no need for absolute positioning.
| Never |


