PDA

View Full Version : Layout size based on percentage


dealwi8me
02-18-2011, 09:25 AM
Hello,

If i want my layout's size to increase/decrease depending on user's window/resolution, the best way is to use in css something like this?

.test {
background-color: #9F0;
height: 10%;
width: 20%;
position: absolute;
left: 18px;
top: 295px;
}

Or is better to have a static size for the layout?

Thank you in advance.

Corrosive
02-18-2011, 10:05 AM
Whether static versus liquid is better is an age old debate you don't want to get into (trust me, you will be more confused by the time we finish!). Make a choice based on what you want to achive. I would say, from your code, to stay clear of absolute positining for layout. Use relative :)

dealwi8me
02-18-2011, 11:36 AM
Ok i will proceed with liquid then with no further questions :)
Thanks for the tip about positioning!