• Site with list problem

    When the list item in this unordered list wraps, it is aligned left instead of tabbed underneath the text.

    Here is the CSS that affects it:

    #page-wrap {
    	height: auto !important;
    	height: 100%;
    	margin: 0px auto -35px;
    	min-height: 100%;
    	width: 960px;
    	}
    
    #bodyText {
    	margin: 0pt auto;
    	width: 900px;
    	}
    
    .post {
    	margin: 0pt auto;
    	text-align: justify;
    	}
    
    .post p {
    	margin-bottom: 15px;
    	}
    
    .post ul {
    	list-style: disc inside;
    	margin: 0 15px 15px 0;
    	text-align: left;
    	}

    I’ve tried looking at several sites about styling unordered lists, and couldn’t find the solution.

Viewing 5 replies - 1 through 5 (of 5 total)
  • try adding this to your stylesheet

    .post ul li { text-indent: -15px; }

    You will need to adjust the margin or padding on the <ul> as this will shift the list’s start position over to the left. However it does line the overflow line up with the start if the text on the first list line.

    Thread Starter curtisblackwell

    (@curtisblackwell)

    good idea on the text-indent. i was trying a negative margin on first-line and nothing happened.

    the negative indent does fix the problem of the wrapped line lining up with the first line; however, putting a margin or padding on the ul isn’t moving the ul over, unless it’s a ridiculous amount like 800px. if i set it to the amount necessary to make this work, i won’t be able to float an image to the right.

    Thread Starter curtisblackwell

    (@curtisblackwell)

    any other ideas?

    Try floating that UL right. You can adjust the padding and width

    float: right;

    Thread Starter curtisblackwell

    (@curtisblackwell)

    yeah, i tried that and it just bumped the ul down below the image to the right.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Unordered Lists Wrapping Incorrectly’ is closed to new replies.