Results 1 to 2 of 2

Thread: Stretching background

  1. #1
    niv is offline New Member: Posts Will Be Moderated
    Join Date
    Feb 2011
    Posts
    5

    Stretching background

    Hi, I was wondering if it were possible to have the background of a div stretch vertically. How can I go about doing this?
    Last edited by niv; 20 Feb 2011 at 09:42 PM.

  2. #2
    Join Date
    Apr 2010
    Location
    Chicago
    Posts
    302
    Why hello again! haha

    Sure...what you gotta do is add three DIVs inside the column div, say bubble_top, bubble_mid, bubble_bottom (or whatever). Apply bubble_02 to the middle piece...like:

    Code:
    .bubble_mid {
    background:url(images/bubble_02.png) repeat-y scroll 0 0 transparent;
    width:450px;}
    Then you would put all your content (paragraphs, headings) in there (the middle DIV).

    But -- you will probably want some padding added, otherwise the text will be right up against the sides. So maybe:

    Code:
    .bubble_mid {
    background:url(images/bubble_02.png) repeat-y scroll 0 0 transparent;
    width:450px;
    padding: 40px 20px;}
    That will apply 40px to the top/bottom, and 20px to the left/right. Or you could do: padding: TOPpx RIGHTpx BOTTOMpx LEFTpx;

Posting Permissions

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