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 4 of 4
  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts

    what can css boxes do?

    I am trnsitioning from tables to css boxes for layout. I am wondering if css boxes can do force elements to stay inside the box like tables can.

    Right now I have text inside one css box that overflowing out the box completly.

    http://royalvillicus.com/photo_site/...e/photo_1.html

    I appreciate any help

  • #2
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Not sure what you mean by 'css boxes'. Do you mean 'div'? That is html, not css.

    I'm not on my dev computer but, if the element is floated, elements are never to expand to contain floated elements and you may need to 'clear the float'.

    EDIT: Well, it looks like your 'spec' div is set at 400px height and that's why the text overflows. You probably just want to remove that altogether.
    Last edited by drhowarddrfine; 05-19-2009 at 11:28 PM.

  • #3
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Thanks interesting point. The problem that brought this up I am trying to wrap text around another div tag. Currently the text just starts below the other div tag instead of next to it then move its way down.

    Thanks a lot for the help

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,851
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    You'd need to use float for displaying two block level elements like <div> in the same line.
    Try setting a float:left; and a required width(say width:150px; ) and then a suitable margin-left (in this case margin-left:150px to the second one.
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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