Topic: absolutly positioned centered div? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28980" title="Pages that link to Topic: absolutly positioned centered div? (Page 1 of 1)" rel="nofollow" >Topic: absolutly positioned centered div? <span class="small">(Page 1 of 1)</span>\

 
FatRod
Bipolar (III) Inmate

From: #UK SURREY
Insane since: May 2002

posted posted 02-22-2007 16:43

is it possible?

i need to control the stacking order (z-index) of a div but also want it to be centered (margin: 0 auto)

cant think of another way round this expect using negitive margins and having a fluid layout which does not suit my needs.

ben

reisio
Paranoid (IV) Inmate

From: Florida
Insane since: Mar 2005

posted posted 02-23-2007 02:23

you can use z-index with position: relative;...

Pixlluv
Obsessive-Compulsive (I) Inmate

From: Dallasish
Insane since: Mar 2007

posted posted 03-02-2007 22:24

so you want your div to be a certain width and be centered in the browser no matter the resolution?

try adding a

margin-left: auto; margin-right: auto;

to your "wrapper" div

~Pixl



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu