开发者

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

开发者 https://www.devze.com 2022-12-30 11:08 出处:网络
Here is HTML and CSS. On开发者_运维问答 17\'\' and 19\'\' screen it looks nice. How I could catch the bug?

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

精彩评论

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