Forum Moderators: open

Message Too Old, No Replies

Getting an Image to the TOP of the Screen

         

peterinwa

1:38 am on Nov 15, 2004 (gmt 0)

10+ Year Member



With this simple coding:

<html>
<head>
</head>
<body bgcolor="#ffffff">
<img src='image.gif' width=480 height=52 border=0>
</body></html>

The image appears about 1/8 inch below the top of the screen in Netscape and almost 1/4 inch below with Internet Explorer.

This is a waste of valuable space (in my case). Any ideas how to move it to the top? I have seen some websites where images appear to go all the way up and I'm sure it's a graphic... not just the background.

Thanks, Peter

mikec

1:59 am on Nov 15, 2004 (gmt 0)



<body style="background-color:#fff; margin: 0; padding: 0;">
<img src='image.gif' width="480" height="52" style="boarder: 0;" alt="whatever">

this should really all be done in one style sheet file.

peterinwa

2:39 am on Nov 15, 2004 (gmt 0)

10+ Year Member



Thanks, I'm using a style sheet to put this in. Then I guess I also need to put class="whatever" in the <img.

Do you know of a source on the internet that defines the meaning of margin, padding and border?

If not I'll check the CSS forum.

Thanks!

mikec

2:47 am on Nov 15, 2004 (gmt 0)



put in
body,html {
background-color: #fff;
margin:0;
padding:0;
color: #000;
whatever other styles you have set for the body...
}
img {border:0;}

as for the meanings of margin and padding, see [w3.org...]

[edited by: tedster at 3:46 am (utc) on Nov. 15, 2004]
[edit reason] make the link live [/edit]

peterinwa

3:13 am on Nov 15, 2004 (gmt 0)

10+ Year Member



Thanks again. I didn't know how to put the border 0 in a style sheet.

CSS is new to me and it sure makes everything easier... especially since I want all my pages to have the same look.

I'll bookmark that site.

Peter