开发者

CSS width 100% doesn't work properly on 22'' monitor

Here is HTML and CSS.

On开发者_运维问答 17'' and 19'' screen it looks nice. How I could catch the bug?

Please help.


I'm assuming you don't want the content area to be as wide as the whole maximized browser window?

you need to give your #wrapper div a set width, then all the other divs can assume a width of 100% from it.

For example,

#wrapper
{
    margin-left: auto;
    margin-right:auto;
    width:960px;
}


Try something like this:

<html> <body style="margin:0px;"> <div style="padding-left:50px;text-align:left;"> <div style="border:solid 1px red;width:100%;">content here</div> </div> </body> </html>

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜