Click to See Complete Forum and Search --> : Make image flush with edge of browser


geuis
06-03-2003, 04:49 PM
I used to know how to do this, but its been a while. How do I get an <img> to be flush with the left and top of the browser window?

khaki
06-03-2003, 04:58 PM
you could absolutly position it using CSS.

Do you use CSS?

;) k

Charles
06-03-2003, 05:03 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Example</title>
<style type="text/css">
body, img {border:0px; margin:0px; padding:0px}
</style>
<img alt="W3C &amp;copy;" src="http://www.w3.org/Icons/w3c_home">

geuis
06-03-2003, 07:52 PM
I don't really use CSS a lot, though I know I should. I used to use an attribute that was placed into the <table> tag, like <table attribute="left"> or something like that.

I tried the CSS code. It works. I can always use it as an alternative, but I would love to try to remember how to do it with regular HTML like I used to.

khaki
06-03-2003, 10:40 PM
hi geuis...

do you mean something like:

<body marginheight="0" marginwidth="0">

(i think that's right... but thankfully CSS is making me forget this stuff :rolleyes: )

and why (if I may ask) is CSS an "alternative"?

Are you trying to be retro or something :)

marginally out of whack...
;) k

havik
06-03-2003, 10:44 PM
<body marginheight="0" marginwidth="0">

That doesn't validate for the latest html doctype.

CSS should, in my opinion, be used instead as Charles posted.

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

Havik

khaki
06-03-2003, 11:03 PM
ummmm...

duh!

read the post havik.

geez... I know it won't validate...
and I know it's not CSS.

since when is it a crime to try to provide the requested solution? :(

feel free to correct me if the html solution that I provided is wrong (and maybe it is :confused: )...

but otherwise...
HUH?

:( k

IrDa
06-04-2003, 12:57 AM
khaki's solution will work and I believe it is the only way to do it. Either by css or use <body margin> properties.

havik
06-04-2003, 04:28 PM
geez... I know it won't validate...
and I know it's not CSS.

since when is it a crime to try to provide the requested solution? :(


I know you know it won't validate and it's not CSS, I was pointing that out to geuis.

C'mon khaki, you know that I know that you know (confusing? :D) that doesn't validate.

Havik