Forums

Unordered Lists Wrapping Incorrectly (6 posts)

  1. curtisblackwell
    Member
    Posted 4 years ago #

    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.

  2. stvwlf
    Member
    Posted 4 years ago #

    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.

  3. curtisblackwell
    Member
    Posted 4 years ago #

    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.

  4. curtisblackwell
    Member
    Posted 4 years ago #

    any other ideas?

  5. stvwlf
    Member
    Posted 4 years ago #

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

    float: right;

  6. curtisblackwell
    Member
    Posted 4 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic