Archived

This topic is now archived and is closed to further replies.

HTML Question

This topic is 5034 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

When i load an image which is supposed to be my banner I get a space between the banner and the top of the page. How do i eliminate that and make the image at the top of the page. Heres the website shit:
<html>
<body bgcolor = "black">
<img src="banner.bmp">
</body>
</html>


Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share on other sites
<html><head><title>Cory''s Page</title></head><body bgcolor = "black"><div style="position:absolute;top:0"><img src="banner.bmp"></div></body></html>

First make it work, then make it fast. --Brian Kernighan

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)

Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte

Share on other sites

I think that''s the way. That''s how I did mine.

"Give a man a fish and he will eat for a day. Teach a man how to fish and he will eat for a life time."
-Chinese Proverb
WiseElben.com - Experience Wisdom

Share on other sites
Thanks that worked

Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share on other sites
Another question how do I make a link appear in a new window?

Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share on other sites
<a target = "_blank" href = "http://www.somelink.com">somelink</a>

[edited by - JohnyB on May 8, 2004 12:45:09 AM]

Share on other sites
Thanks johny i knew i saw it like that somewhere i just couldn''t remember exactly how to do it.

Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share on other sites
Another possible solution to your first problem is to set the padding of the page to 0 using CSS (but the first solution works just fine and neither is really better than the other AFAIK).

CSS Tutorial

Share on other sites
But a solution to all your problems is to grab an HTML reference!

Share on other sites
quote:
Original post by CaptainJester
<html><head><title>Cory's Page</title></head><body bgcolor = "black"><div style="position:absolute;top:0"><img src="banner.bmp"></div></body></html>

Or just set margin to none.

Jay

Edit: W3 HTML Specs

[edited by - Jason Zelos on May 9, 2004 7:06:31 AM]

Share on other sites
Never ever use "position: absolute", since that ruins your layout.
If you use it, then the browser won''t count it as an object in the page, more like floating on the page. Use this standard way instead:

<body bgcolor="black" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">...</body>

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..

Share on other sites
Thanks i like that way better. None of this div align shit

Favorite Quotes:Gandalf: You shall not pass!|Smeagol: We don''t need you!|Sloth: Hey you guys!|

Share on other sites
Or there's:

<body style="margin:0px;">

Which is CSS embedded straight into the HTML.

Edit: OK 'nostyle=' should be 'style=' but it changes it each time I post.

[edited by - botman2 on May 9, 2004 12:26:25 PM]

Share on other sites
Argh, except now it''s decided to actually show style afterall, but I''m too scared to edit my post again.

Share on other sites
Just bite the bullet and write a linked style sheet. Its far simpler than embeding provided you reuse the same elements.

IE
Body {	Margin: 0px 0px 0px 0px;}

Jay