Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Left floated element and unordered lists (ul).

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28911

    Hello, I am trying to indent the li elements of a ul. There is a left floated div with an image in it. The li element will indent only if I add left padding that is wider than the image itself. I you would like to look at a version irl, http://superuntitled.com/cms/home. On this page, I have given the li a background color to demonstrate.

    Code:

    homepage.jpg

    Est tincidunt doming iis nobis nibh. Ullamcorper eorum elit lius me delenit.


    Lorem

    • list element
    • list element
    • list element

    The css:

    Code:
    .left {float: left; }
    .left img {padding-right: 20px;}
    ul li { padding-left: 10px; background: blue; }

    thanks!

    #75011

    i have added "position:relative;" to the ul and added "left:10px;", this seems to work.

    Does anyone have a better way?

    #75007
    TheDoc
    Member

    Add "padding-left: 390px;" to your text-area div. Add "padding-left: 10px" to your li.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.