doctrin13th
11-20-2009, 01:55 AM
i have a DIV section on my page with id="containertop"
i have also a DIV id="containertitle" INSIDE the "containertop" div
the css of the containertop is
#containertop {
bgcolor: #CCCCCC;
margin:0px;
width:483px;
height:48px;
}
the css of the containertitle is
#containertitle {
margin:20px 0px 0px 20px;
}
what i want is for the containertitle's top and left margin inside the containertop to be 20px and the rest is 0px.
the output of the left margin seems working
but the top margin, which i set for the containertitle applies also to the parent DIV which is the containertop.
so the result is the text inside the containertitle is 20px away from the left edge on the containertop, which is what i want, BUT the containertitle's text is placed on top even if i set the top margin 20px away from the containertop's edge.
my html is
<div id="containertop">
<div id="containertitle">
REAL ESTATE MORTGAGE LOAN
</div>
</div>
how can i make it so that the text "REAL ESTATE MORTGAGE LOAN" will have it's margin 20px top and left from it's container(containertop)?
i have also a DIV id="containertitle" INSIDE the "containertop" div
the css of the containertop is
#containertop {
bgcolor: #CCCCCC;
margin:0px;
width:483px;
height:48px;
}
the css of the containertitle is
#containertitle {
margin:20px 0px 0px 20px;
}
what i want is for the containertitle's top and left margin inside the containertop to be 20px and the rest is 0px.
the output of the left margin seems working
but the top margin, which i set for the containertitle applies also to the parent DIV which is the containertop.
so the result is the text inside the containertitle is 20px away from the left edge on the containertop, which is what i want, BUT the containertitle's text is placed on top even if i set the top margin 20px away from the containertop's edge.
my html is
<div id="containertop">
<div id="containertitle">
REAL ESTATE MORTGAGE LOAN
</div>
</div>
how can i make it so that the text "REAL ESTATE MORTGAGE LOAN" will have it's margin 20px top and left from it's container(containertop)?