[HTML/CSS] Text continues past the <div> border

Discussion in 'Web Design & Coding' started by Glaanieboy, Apr 24, 2005.

  1. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Check my website at http://glaanieboy.nl (it's being redesigned, stuff like the shoutbox are broken atm). If you click the 'What is my IP address?' link on the left, you can see your IP address and two links to Wikipedia explaining what an IP address is. I also put a little footnote in small print, a little notice that I won't use the IP address for anything other than storing in my server-logs etc.
    But as you can see, this little notice continues to go past the virtual border of the middle div (see code below). How can I make the text to 'break' at the virtual border?

    Code:
      <div style="width: 25%; height: 100px; position:absolute;">
      [..]Links bla bla[..]
      <!--End of left div-->
      </div>
      <!--Middle div (content)-->
      <div style="position:absolute; left: 25%;">
        <h3>Your IP address</h3>Your IP address is 81.71.58.154<br><br>
      <a href="http://en.wikipedia.org/wiki/IP_address" target="_blank">What is an IP address?</a><br>
      <a href="http://nl.wikipedia.org/wiki/IP-adres" target="_blank">Wat is een IP adres?</a><br><br>
    
      <span style="font-size: 9pt;">Your IP address is only being recorded in the logs of my webserver.
      I and only I know your IP address, I ain't gonna sell it or give them away.</span>
      <!--End of middle div-->
      </div>
      <!--Right div (shoutbox)-->
      <div style="position:absolute; left: 80%;">
      [..]Shoutbox code[..]
      </div>

    Anyone help me? Thanks
     
  2. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    Looks like I had to force a virtual border for the middle div by giving it a maximum width:
    Old:
    Code:
    <div style="position:absolute; left: 25%;">
    New:
    Code:
    <div style="position:absolute; left: 25%; width: 55%;">
     
  3. jimi_81

    jimi_81 Moderator Political User

    Messages:
    820
    Location:
    Stoney Creek, ON, Canada
    too bad you cant rep yourself eh!
     
  4. Glaanieboy

    Glaanieboy Moderator

    Messages:
    2,626
    Location:
    The Netherlands
    I have always you :p


    I don't care for reputation btw ;)