SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Location
    Berlin
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Aligning an unordered list

    Hey,

    although I recently built some unordered list grid table stuff, I don't understand why this one isn't aligning. You can find the website right here : http://www.phermann.tk/gera . You can find the problem under the slider, there are 4 pictures. This has to be aligned, but margin: 0 auto; isn't working for the ul though I fixed the width and set display: inline; .Please ignore the enormous loading times, I didn't resized the native image resolutions yet. If it is possible, I would like to have a solution without the fixed width, so that some responsiveness is possible.

    Thank you for your support.

    Paul.

  2. #2
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    A simple way would be to add text-align: center to the UL and display:inline-block to the LI and remove the float from that LI.

    By the way, the images reminded me of Minecraft.
    Maleika E. A. | Rockatee | Twitter | Dribbble



  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2013
    Location
    Berlin
    Posts
    35
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    thank you for your ultra fast response, your solution worked for me. I wonder that the text-align is working with the lis. Actually thought that they would work for text only, but good to know.

    And the pictures are taken in minecraft, you are totally right ;D.

    Thank you again.

  4. #4
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    The text-align property allows you to position the inner content of any block element.
    Maleika E. A. | Rockatee | Twitter | Dribbble




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
  •