Results 1 to 2 of 2

Thread: CSS- problems with bordered box

  1. #1
    Join Date
    May 2004
    Posts
    51

    CSS- problems with bordered box

    First of all, thanks for your help. My page is http://www.improveyourwebvisibility.com/GeneLeaders. If you look right under the heading "Welcome to Geneleaders.com", you will see a bordered box (it's really light, but it's there) that contains the text, "On this website right here...".

    What I would like to know is how to extend the height of that bordered box so it expands to fit that text that is there. Currently, the text is expanding way beyond the bottom of that bordered box. The text itself is fine, I'm just not sure how to extend the box.

    Thank you so much in advance!

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Your link doesn't work so I'm just giving general advice.

    The way to get a div to expand to suit the text inside is not to give it a height; it will expand to suit the content and can then expand more if someone increases text size and if there is room. This won't work all the time, but will if nothing else is stopping the div from expanding down.

    If you have a background color or image in the div without a height but with a float, you may have to use special code that drags the background down as floated divs are assumed to have no height, but it seems that this is not your problem.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. M$ needs to be slaped in the face. CSS problems
    By NotalesS in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 30 Apr 2008, 05:34 AM
  2. Problems Positioning with CSS
    By kirstybandm in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 17 Jan 2006, 05:33 AM
  3. Having Problems with CSS Positioning
    By kirstybandm in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 13 Jan 2006, 09:28 AM

Posting Permissions

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