SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: floating?

  1. #1
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    floating?

    On,
    http://fixmysite.us/OTO/102.shtml
    I'm floating all objects to the left, is there a way to center them so that the last 2 look centered instead of on the left?
    Thanks
    "Oh, and Jenkins--apparently your mother died this morning."

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,264
    Mentioned
    115 Post(s)
    Tagged
    1 Thread(s)
    Why don't you float them all right instead, at which point the bottom two would line up with the rest on the page (which would look best IMNSHO)
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    As Dave said you could float them right and so they would always match fro the right.

    Or if you don't want them to wrap under the left item then create two columns instead.

    It all depends on what you want exactly.

  4. #4
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    ok, made some changes
    http://fixmysite.us/OTO/102.shtml
    when I tried floating the .container and images to the right, I had the same problem, but the bottom 2 pics were on the right instead of course so I need to explain a bit.
    What im trying to do is float all the objects so they appear centered in the #content div, so when and third row of images do it leaves the images slighntly skewed to the left. But how do I center those 2?
    "Oh, and Jenkins--apparently your mother died this morning."

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,355
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    I suppose you can't add a class to them and move them across with a margin?

    Otherwise if you want centred blocks then you could try display:inline-block instead of floating and use text-align:center on the parent to center them.

    Code:
    #content{text-align:center}
    #content a img.a {
    border:1px solid #6CB3DF;
    display:inline-block;
    margin:10px 5px;
    padding:10px;
    
    
    }
    
    .container {text-align:left}
    I don't think that's what you meant either though

  6. #6
    SitePoint Wizard lukeurtnowski's Avatar
    Join Date
    Mar 2003
    Location
    Coronado
    Posts
    1,644
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    thanks
    "Oh, and Jenkins--apparently your mother died this morning."


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
  •