简体   繁体   中英

html body is displaying left aligned but in css it is set to centered

I have a couple of questions. Please see http://jsfiddle.net/POZR2/

Firstly if you scroll to the right you will see a white space, if you change the size of the screen/result box the size of the white space gets larger/smaller. The css for this is under the 'full' div and is:

#full{ background-color:#262626}

Secondly even though div id noint_box1 is centered in css it appears to be aligned left. This div is basically the 'body' of the html from the first heading to the last picture.

Thnkas

your table is inheriting your centering, but not using it. add margins to it if you want it centered

table { margin: auto; }

Give #full a min-width of 1061px - this for the first of the two issues.

For the other one... well, I'm not quite sure it's this that you want, but try applying the following rules to #noint_box1 :

width: 958px;
margin: 18px auto;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM