Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 2 of 2
  1. #1
    Enthusiast Abadax's Avatar

    Join Date
    Apr 2009
    Location
    North America
    Posts
    1,723

    <div> background-color

    I'm making a site for a local roller rink, and they host parties. I'm trying to have three sections. one for each party package. The three sections all will have different background colors, inside one whole background wrapper. The problem I'm facing is the fact that I can't get the wrapper to have a background color, unless the last section is not on the same line as the other two. I can't seem to figure out what the problem is. The class in the HTML is the same as the css. I haven't spelled anything incorrectly, I really don't know.

    Code:
    HTML
    [spoiler:v2tngyqs]<link rel="stylesheet" type="text/css" href="parties.css">
    <div class="ps">
    <div class="bpp">
    <h2 class="h2">
    Basic Party Package
    </h2>
    <p class="p">
    -Admission and regular skate rental



    -Pitcher of soft drinks



    -Vanilla Ice Cream Cups



    -Decorated "SKATE" Cake



    -Pitcher of soft drinks



    -Roller Skating Themed Table Setting

    (Plate, Napkin cup and Placemat)



    -Free Admission Pass for the Birthday Child

    (valid for a return Visit)



    -Party Hestess to Serve Your Party

    (Gratuity not Included)

    </p>
    </div>
    <div class="dpp">
    <h2 class="h2">
    Deluxe Party Package
    </h2>
    <p class="p">
    -Admission and regular skate rental



    -Vanilla Ice Cream Cups



    -2-16" Pizzas OR a Decorated "SKATE" Cake



    -Two (2) Pitchers of soft drinks



    -Roller Skating Themed Table Settting
    (Plate, Napkin, Cup and Placement)



    -Free Admission Pass for the Birthday Child
    (Valid for a Return Visit)



    -Party Hostess to Serve Your Party
    (Graduity Not Included)



    -Globe Bracelet for Each Person



    -Ten (10) Game Tokens for the Birthday Child



    -Six (6) game tokens for each Guest

    </p>
    </div>
    <div class="epp">
    <h2 class="h2">
    Extreme Party Package
    </h2>
    <p class="p">
    -Admission and regular skate rental



    -Vanilla Ice Cream Cups



    -Two (2) Pitchers of sot drinks



    -Roller Skating Themed Table Setting
    (Plate, Napkin, Cup and placemat)



    -Free Admission Pass for the Birthday Child
    (Valid for a Return Visit)



    -Party Hostess to Serve Your Party
    (Gratuity not included))



    -Globe Bracelet for each person)



    -Ten (10) game Tokens for the birthday child



    -Six (6) game Tokens for each Guest



    -Forty (40) Extra Game Tokens to Share



    -Flashing Birthday Button for the Birthday Child



    -Bag of Cotton Candy for each Guest



    -$1.00 Admission Pass for Guests

    </p>
    </div>
    </div>[/spoiler:v2tngyqs]

    CSS:
    [spoiler:v2tngyqs].ps
    {
    background-color: yellow;
    }
    .bpp
    {
    width: 276px;
    float: left;
    background-color: red;
    }
    .dpp
    {
    background-color: yellow;
    width: 276px;
    float: left;
    }
    .epp
    {
    background-color: green;
    width: 276px;
    float: left;
    }[/spoiler:v2tngyqs]

  2. #2
    lucien is queen Hazzystan's Avatar

    Join Date
    Feb 2008
    Location
    Scotland
    Posts
    2,977

    Re: <div> background-color

    .ps has to float left too - it should work fine after that.

    Code:
    .ps
    {
    background-color: yellow;
    float: left;
    }
    what is homo love?


 

Posting Permissions

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