• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

html -header help

mjrand

Senior member
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?
 
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.
 
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;
}
 
Back
Top