SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    putting the white boxes inside of titleWrap with padding:5px

    #titleWrap has the code below
    Code:
    #titleWrap {
    margin:0 1px;
    border:1px solid #555;
    background:#ffff88;
    text-align:center;
    padding:5px;
    }
    I like to make the result of it at http://dot.kr/x-test/layOut/12/ that the white boxes of sosthers and kids are inside the yellow box (#titleWrap) which has the code padding:5px.

    But the actual result of it is that the both bottom lines of the white box(sosthers) and the other white box (kids) are outside of the yellow box (#titleWrap).

    How can I put the the full white boxes including the bottom lines of them to inside of the yellow box(#titleWrap)?

    If I add height:30px to #titleWrap, I can put the full white boxes to inside of the yellow box(#titleWrap) .

    With the code height:30px, it's okay at http://dot.kr/x-test/layOut/13/ when the title is short, but it has the problem at http://dot.kr/x-test/layOut/14/ that some of the title text is outside of the yellow box(#titleWrap) when the title is very long.

  2. #2
    Mazel tov! bronze trophy kohoutek's Avatar
    Join Date
    Aug 2004
    Location
    Hamburg, Germany
    Posts
    4,248
    Mentioned
    30 Post(s)
    Tagged
    0 Thread(s)
    You need to contain the floats, otherwise content will spill out.

    Code CSS:
    #titleWrap {
    margin:0 1px;
    border:1px solid #555;
    background:#ffff88;
    text-align:center;
    padding:5px;
    overflow:hidden;
    }
    Maleika E. A. | Rockatee | Twitter | Dribbble



  3. #3
    Get my greedy down dotJoon's Avatar
    Join Date
    Apr 2003
    Location
    daejeon, South Korea
    Posts
    2,223
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much, kohoutek.


Bookmarks

Posting Permissions

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