PDA

View Full Version : theres a border round a graphic I can't get rid of....



Blue Cat Buxton
09-23-2004, 02:26 PM
Have a look at my adventure vacations site there is an invisible border round the graphic, infact round the entire page, about 20 px wide.

You can see it quite clearly just looking at the header:

http://www.wideopenspaces.co.uk/headera.htm

if you look at the top right hand corner.

I haven't deliberately put it there, so how can I get rid of it and get the picture in the top of the corner?

tomek
09-23-2004, 02:42 PM
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

100 points for me :)

abelony
09-23-2004, 02:44 PM
Or you could add the following tag to your style sheet:

body {
margin: 0px;
}

tomek
09-23-2004, 02:46 PM
I think the style sheet way doesn't work with old browsers like nn4...
the body-attribute way works in all browsers...

abelony
09-23-2004, 02:50 PM
Oh I see.

From what I have read though, worrying much about old browsers is a waste of time. I personally don't care. Such a small amount of my visitors use old browsers that I don't see a reason to code for them.

mobilebadboy
09-23-2004, 02:56 PM
Use margin as well as padding and that should cover most any browser that really matters.

body {
margin: 0px;
padding: 0px;
}

And if you're trying to run valid XHTML, that old way won't validate.

Blue Cat Buxton
09-23-2004, 03:09 PM
I knew it was something simple; just looking at it for the last 2 hours that made it complicated.

Thanks guys.