Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question problem with ordered list text wrapping image

    not sure what is going on. ordered list numbers are over image in safari, and underneath the image the ordered list numbers dont even show up. just want a standard text wrap around image.

    www.nylafilms.com/about

    Thanks.
    David

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello hwoodfilm,
    Does this work better for you?
    Code:
    img.left { 
    padding-right:14px;  
    float: left
    }
    ol {
    list-style:none;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    it is better, except, the numbers are now gone completely.

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Sorry,
    This puts your numbers back and moves everything over far enough they display correctly -
    Code:
    img.left { padding-right:30px;  float: left}
    
    ol {margin: 0 0 0 30px}
    Some tips on styling lists.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    New Coder
    Join Date
    Feb 2009
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts
    better...but still acting wacky in safari.

    the ordered list to the right of the image: the numbers start too far to the left relative to the other text.

    the ordered lists underneath the image: the ordered lists have the proper indentation of the numbered items.

  • #6
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,667
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Quote Originally Posted by hwoodfilm View Post
    better...but still acting wacky in safari.

    the ordered list to the right of the image: the numbers start too far to the left relative to the other text.

    the ordered lists underneath the image: the ordered lists have the proper indentation of the numbered items.
    Lists have always had issues next to floats... I'll have another look at that in a minute.
    For now though, the way you're laying this out might be a lot easier if you used a Definition List. You really shouldn't position things with the <br /> and your repeated use of <strong> would work well as the <dt> in a dl.
    You can even embed an ol in the dl so you can keep your numbers. Here's an example of mine. As always, view the source to see how it's done.
    [Tip - use top and bottom margins on the dl, dt, dd, ol and li to space things the way you want, instead of the <br />]

    I'm not saying that is going to cure your issue with Safari right off the bat though, I just think a dl is a more semantic approach for your layout.

    ==================

    For your current issue, if you add a background color to your ol, you can see it stretches full 545px width of the containing #content (515px plus the 30px margin). Even behind elsewhereportraitweb.jpg the ol is full width.
    The 30px margin we put on the image affects only the li.
    You may be able to fix that by changing how it is displayed...
    Try this adding this to your CSS -
    Code:
    ol {
    background: #f00; /*color for demonstration only*/
    display: inline-block;
    }
    You will probably want to adjust that margin on your image after adding that.


    I still think the dl is the way to go.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

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