Closed Thread Icon

Topic awaiting preservation: centering images automatically (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8523" title="Pages that link to Topic awaiting preservation: centering images automatically (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: centering images automatically <span class="small">(Page 1 of 1)</span>\

 
frogstar
Nervous Wreck (II) Inmate

From: Salt Lake, Ut, USA
Insane since: Feb 2003

posted posted 02-11-2003 00:40

is there a way to make an image align itself in the center of the browser window, regardless of size etc. . .



[This message has been edited by frogstar (edited 02-11-2003).]

[This message has been edited by frogstar (edited 02-11-2003).]

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 02-11-2003 01:04

you can use CSS to set the position:absolute and set top and left to 50% the set the margins of the image to negative half their real (edit: [height and width])attributes. Or you can slap it in a table valign="middle" align="center".

Jason

[This message has been edited by JKMabry (edited 02-11-2003).]

Hugh
Paranoid (IV) Inmate

From: Dublin, Ireland
Insane since: Jul 2000

posted posted 02-12-2003 20:38

There is also of course the <center> center tags </center> which might do for what you want as good as JKMabry's solution.

Edit: oh sorry I wasnt thinking, that will only center it horizontally, you didnt specify .. but thats what im guessing, just go with JKMabry's then (Tables can also be set up to display in the dead center both axis.)

[This message has been edited by Hugh (edited 02-12-2003).]

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-12-2003 21:14



[This message has been edited by Slime (edited 02-12-2003).]

frogstar
Nervous Wreck (II) Inmate

From: Salt Lake, Ut, USA
Insane since: Feb 2003

posted posted 02-13-2003 00:50

Thanks, I haven't done any coding an quite a while and was stumped on an easy one. Now I'm ready to roll! Thanks again for the advice


« BackwardsOnwards »

Show Forum Drop Down Menu