...

View Full Version : Mixing CSS Positioning Types?



Daniel_A_Varney
07-02-2011, 02:01 PM
Is it possible to use an absolute positioned element inside a layout which is built using relative positioning? I would like to be forewarned, if possible, about any potential issues or conflicts which might arise...

Thank you.

far2many
07-02-2011, 04:33 PM
Hello

Yes it is you might like this nifty link mate

http://css-tricks.com/791-absolute-positioning-inside-relative-positioning/

Peter

Daniel_A_Varney
07-02-2011, 06:56 PM
Thanks, mate. Thats brilliant! Have given that one a good read.

Daniel_A_Varney
07-02-2011, 06:58 PM
Also, is it okay to mix sizes (I have chosen to work in EMs) with percentages for making columns? I was thinking of having my left navigation column of a fixed size (say 20em), then having the rest of the space divided up into % (about 30/70%, just for example) to make it semi-fluid.

far2many
07-02-2011, 11:00 PM
You can mix em size and px size. you can fix the width of a div and have others fluid (though may look a little mad). However if you dont specify the height of a div it will adjust itself to the content.

Peter

Sammy12
07-02-2011, 11:37 PM
Also, is it okay to mix sizes (I have chosen to work in EMs) with percentages for making columns? I was thinking of having my left navigation column of a fixed size (say 20em), then having the rest of the space divided up into % (about 30/70%, just for example) to make it semi-fluid.

Then whatever content you have in the right hand column has to be set in %. I wouldn't advice you to use ems, since px have more options vs the large and bulky em. How about setting the columns to a fixed width and set gutters in %? that would be more semi-fluid

Daniel_A_Varney
07-03-2011, 08:05 AM
I wouldn't advice you to use ems, since px have more options vs the large and bulky em. How about setting the columns to a fixed width and set gutters in %? that would be more semi-fluid

Quite a few articles I have read recommend using ems because it makes the site more scalable during text zoom. What do you mean by "px have more options"? Ems are not 'bulky' when you start specifying the fractions.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum