I have successfully implemented a liquid layout for my website by setting the body tag width to 100%.
<html>
<head>
</head>
<body>
<div id="container">
some content
</div>
</body>
body
{
margin: 0;
padding: 0;
width: 100%;
}
However, I encountered an issue where on some pages a vertical scrollbar is displayed, causing the body tag's width to reduce by 16px. I need to find a way to set the body width so that the display of the scrollbar does not affect it.
Despite trying to adjust the width using -moz-calc(100% - 16px) in Firefox 9, it did not work as expected:
body{ width: -moz-calc(100% - 16px); }
Does anyone have any suggestions on how to achieve this without affecting the layout?