Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default Need help with DIVs please :(

    Ok, I get the below problem:



    Here is a link to the page:

    http://www.ian559.pwp.blueyonder.co..../huh/home.html

    and the CSS:

    http://www.ian559.pwp.blueyonder.co....rd/huh/css.css

    Any ideas?

  2. #2
    ScottDiamond Guest

    Default

    Is it coded in CSS and Divs or Tables and Divs?

  3. #3
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default

    CSS and DIVs. The section of CSS it is is:
    Code:
    div.middle { width: 790px; background-image: url('images/content.png'); background-position: top left; background-repeat: repeat-y; margin: 0px; padding-right: 15px; padding-left: 15px; }

  4. #4
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Code:
    div.middle { width: 780px; background-image: url('images/content.png'); background-position: top left; background-repeat: repeat-y; margin: 0px; padding-right: 25px; padding-left: 15px; }
    Should work


    You don't like me
    Chances are I don't like you.

  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Well your middle div class is streatching the layout.
    Basicly its becuse your redefining the divs actual size as 790, when the div will auto fit a gap. Since your useing a padding, the rendering gets a bit odd, becuse, the text formats as if it has 790px of room, but the padding the moves this text 15px to the right in accordance with the padding, so now the text goes over the edge, then applys the 15px the other side, but rather than resizeing the text format sits a 790px long regaudless of the room.

    I think just removeing the width:790px from the middle class should fix the problem though :p

  6. #6
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor View Post
    Well your middle div class is streatching the layout.
    Basicly its becuse your redefining the divs actual size as 790, when the div will auto fit a gap. Since your useing a padding, the rendering gets a bit odd, becuse, the text formats as if it has 790px of room, but the padding the moves this text 15px to the right in accordance with the padding, so now the text goes over the edge, then applys the 15px the other side, but rather than resizeing the text format sits a 790px long regaudless of the room.

    I think just removeing the width:790px from the middle class should fix the problem though :p
    Wouldn't removing the width make it a fluid layout? If people dont understand what fluid means it means that it'll expand side ways...


    You don't like me
    Chances are I don't like you.

  7. #7
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by RichardKnox View Post
    Wouldn't removing the width make it a fluid layout? If people dont understand what fluid means it means that it'll expand side ways...
    Naa, the container div will maintain the correct sizeing

  8. #8
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Oh. Totally forgot about the container. Silly fool.


    You don't like me
    Chances are I don't like you.

  9. #9
    Join Date
    Feb 2005
    Location
    Sheffield
    Posts
    2,288
    Tokens
    1,686

    Latest Awards:

    Default

    Wehay! Worked a treat. Thanks a lot to all of you +rep Edit: Sorry guys, says I have to spread before giving it to either of you :S:S
    Last edited by Pawf; 16-01-2007 at 09:02 PM. Reason: wha? :S

Posting Permissions

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