Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

top border problem !

Status
Not open for further replies.

gokeeffe

Programmer
Jan 11, 2005
170
IE
Hi

What i want to do is create a border at the very top of my page so that i can push my pages down a bit, but when i apply the code below it also pushes the scroll bar down aswell.I do not want this to happen can it be avoided.

----------------- Code ----------------

body{
margin:0;
padding:0;
background-color: #ffffcc;
border-top:5px solid #000066;
}

-----------------------------------------

Cheers
 
Yes - put a valid DOCTYPE at the top of your page. Something like this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]

Hope this helps,
Dan
 
Cannot reproduce your error. Make sure you have a doctype declaration at the top of the page. My Mozilla 1.7 and IE6 display a blue border at the top but it does not affect the scrollbar position.
 
Ignore the IE5 and IE5.5. Messy browsers that have less and less users every day. You're supporting IE6, that's more MS you need. And it is not a terrible error, it is just a minor design difference.
 
Vragabond,

In your opinion should i just validate my sites with IE6,Firefox,Opera etc and keep an eye on the IE 5.0 & 5.5.
Hard to get a site perfect in all of them.

Tks
Graham
 
Make it look good in IE6, one of the Geckos (NN7, Mozilla, FF), Opera. Check if they're not completely broken in IE5 and IE5.5, IE/Mac. Safari should be no problem. Konqueror as well. You're set. Don't try to make sites pixel perfect, as long as all the stuff is roughly where it is supposed to be, it's ok. Rather work on other stuff --> different resolution, browser sizes, font sizes, screen readers, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top