andrew a
andrew a

Reputation: 23

CSS setting background white

I'm trying to set up the background white for #7 as seen here: http://jsfiddle.net/eab6ytom/1/

I dont want a line going through my text where it says 7.Input Type "submit"/"reset"

Relevant code to this portion:

<div class="subHeader">
        <h3>7.Input Type "submit"/"reset"</h3>

    <div class="submit">
            <div class="subBorder">
                <div class="subBordColor">
                <p> <input type="submit" value="Submit Information" />
                    <input type="reset"  value="    Clear   " />  
                      </p> 
                      </form>
                </div>
            </div>
        </div>
    </div>

     h3{
    position:absolute;
    border-style: solid;
    border-color: blue;
    margin-left:-300px;
    margin-top:200px;
    font-size:12px;
    background-color:white;
}
 .subBordColor{
    border-style:solid; 
    border-color:blue;
    padding:10px;
}
.subBorder{
    border-style:groove; border-width:10px;
    border-top-color:#A0A0A0; 
    border-right-color:#A0A0A0 ;
    border-bottom-color:#A0A0A0 ;
    border-left-color:#A0A0A0 }
}

Upvotes: 2

Views: 34

Answers (1)

Guffa
Guffa

Reputation: 700182

The background color works fine. The reason that the line goes through the box is that it's on top of it. The z order of elements is determined by the element order by default; the last element is on top.

You can add z-index: 1; to the h3 rule to place it on top of the other element.

Upvotes: 1

Related Questions