Grow your CSS skills. Land your dream job.

css background truble

  • # December 23, 2009 at 6:32 am

    i made a web site … everything in good…
    but my contener div has no background color….
    when i take height:auto; than my background color will not be display….

    and in the contener div when i put another div and another div has display:inline ; property than it problem is created………….

    for example :-
    in css style sheet

    .contener{
    widht:800px;
    height:auto;
    background-color:green;
    }

    .other{
    widht:500px;
    height100px;
    display:inline;
    }

    in html page

    <div class="contener">
    <div class="other">
    <div><!–otherdiv close–>

    <div>><!–contener close–>

    if i remove display inline property in other div than we can see backround color of contener and if i dont remove display inline property than background color dont show

    # December 23, 2009 at 8:00 am

    Hi Santosh

    I’m not really sure what you mean ! Do you have this up somewhere so that we can check !

    Also do you have a mockup of the finished thing ?

    Thanks

    # December 23, 2009 at 11:41 am
    Quote:
    if i remove display inline property in other div than we can see backround color of contener and if i dont remove display inline property than background color dont show

    Is it absolutely necessary to use display:inline?

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".