html -header help

mjrand

Senior member
Dec 12, 1999
412
0
76
I'm having problems trying to create a header bar for my site. Basically I want something like the bar at the top of all the pages here with the AT logo in it.

Essentially a bar that goes across the top of my site with a background color of my choice and my logo in the center of it.

I tried creating a simple table with 100% width and no border, but it doesn't come out correctly at all. Is there a better way to do it?
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
Consider borrowing all or part of this solution using CSS.

Tables are an ugly way to do layout, although they should have been adequate for what you tried to do. Without seeing your markup or knowing what you mean by "it doesn't come out correctly at all", it is impossible to say what went wrong.
 

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
Jan 2, 2006
10,455
35
91
Use CSS to define a header bar.

Example:

Put this where you want the header:

<div id="header">
CODE FOR YOUR HEADER
</div>

In your CSS file define the characteristics of your "header" ID.

For example:

#header {
font-family:Arial;
width:1000px;
padding-bottom:15px;
color:#000;
text-align: center;
padding-top: 15px;
margin-left: auto;
margin-right: auto;
clear: both;
}