View Full Version : Layout size based on percentage

02-18-2011, 08:25 AM

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.

02-18-2011, 09: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 :)

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