SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    centering li items

    Hi,
    I am unable to center the listed items on my page www[dot]shellneverknow[dot]com[dot]au/ , under the slide. i tried display:block-inline and margin 0 auto too, but didn't work. any other work around?
    All those who wander aren't lost.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by nofel View Post
    i tried display:block-inline ... but didn't work.
    I should hope not, because it doesn't exist! If you always have three items in each row, this is an easy option:

    Code:
    ul {text-align: center;}
    li {display: inline-block;}

  3. #3
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,889
    Mentioned
    74 Post(s)
    Tagged
    6 Thread(s)
    Before trying Ralph's recommendation try eliminating the HTML and CSS errors:

    http://validator.w3.org/check?uri=ht...Inline&group=0

    http://jigsaw.w3.org/css-validator/v...rning=&lang=en
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Wolfshade on earning Member of the Month for August 2014

  4. #4
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by John_Betong View Post
    Before trying Ralph's recommendation try eliminating the HTML and CSS errors:

    http://validator.w3.org/check?uri=ht...Inline&group=0

    http://jigsaw.w3.org/css-validator/v...rning=&lang=en
    The backend is a CMS, the errors aren't mine. So i wouldn't mind. But @ralph.m ; technique didn't work

    Edit: it did work @ralph.m ; , as i didn't remove the float:left;
    All those who wander aren't lost.

  5. #5
    SitePoint Wizard nofel's Avatar
    Join Date
    Aug 2007
    Location
    Earth
    Posts
    1,766
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Again stuck, at the other li, on same page under 'featured items'
    All those who wander aren't lost.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,319
    Mentioned
    462 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by nofel View Post
    Again stuck, at the other li, on same page under 'featured items'
    Those list items are floated in several places, so you'll need to remove those. Check the inspector to see where these floats reside.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •