开发者

Empty space at the end of UL list

开发者 https://www.devze.com 2023-03-31 10:17 出处:网络
http://www.sikni8.com/nas/testfooter.htm I didnt quite format it for being online yet but what i dnt understand is which is the UL list taking up the emtpty space at the 开发者_Go百科end? How do i fi

http://www.sikni8.com/nas/testfooter.htm

I didnt quite format it for being online yet but what i dnt understand is which is the UL list taking up the emtpty space at the 开发者_Go百科end? How do i fix it so i can center the LI in the DIV labeled headerC?

Thank you for the assistance!


you're floating the li's left, so you'll never be able to centre them. Try this

li { display: inline-block; }

Which gives you this

Empty space at the end of UL list

you should note though, that inline-block has some pretty poor browser support so it should always be defined like this

li
{
    /* for older versions of FF */
    display: -moz-inline-stack;

    /* for modern broswers */
    display:inline-block;

    /* for IE */
    zoom: 1;
    *display: inline;

}


Give you four lis the style width: 25%; if you want them to have even spacing, but take up the whole ul.

0

精彩评论

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