Hey all,
Notice on this site, the h1 tag is pushed away from the surrounding div where it says “Find A Lawyer”:
Lawyer, Lawyers, Attorney, Attorneys, Law, Legal Information - FindLaw
I try to do the same but this is the result I get:
Notice how the h1 tag is pushed up against the div. Now my design is different from theirs. I wanted to make mine more flexible, so I used 4 images, whereas they used 2. By using 4 images, I have a sliding door effect where the rounded corners can adjust to different sizes of inner content. Hence, why I had to use more divs. But as you can see by using 4 divs like this, I cannot get that h1 tag pushed down away from the surrounding div.
Here is the code:
<style>
/* rounded corners*/
.box {
width: 40em;
background: url(bottom-left.png) no-repeat left bottom;
}
.box-outer {
background: url(bottom-right.png) no-repeat right bottom;
padding-bottom: 5%; /* pushes text above bottom border*/
}
.box-inner {
background: url(top-left.png) no-repeat left top;
}
.box-repeat {
background: url(box-repeat.png) repeat-y left top;
}
.box-inner-inner {
background: url(top-right.png) no-repeat right top;
color: #fff;
}
.box h1 {
background-color: red;
}
</style>
</head>
<body>
<div class="box"> <!-- bottom-left.png -->
<div class="box-outer"> <!-- bottom-right.png -->
<div class="box-inner"> <!-- top-left.png -->
<div class="box-inner-inner"> <!-- top-right.png -->
<h1>News Snippets</h1>
<div id="carousel">
<ul>
<li><a href="#"><img alt="" src="quinn_final.png" width="500" height="213" /></a><p>
FLORIDA VOTERS TURN THUMBS DOWN ON GOV. SCOTT,
QUINNIPIAC UNIVERSITY POLL FINDS;
VOTERS BACK DRUG TESTS FOR STATE WORKERS ALMOST 4-1...</p>
</li>
<li><a href="#"><img alt="" src="report_card_final.png" width="500" height="213" /></a><p>2011 Property and Casualty Insurance
Report Card
A state-by-state analysis of regulatory burden...</p>
</li>
<li><a href="#"><img alt="" src="oppaga_final.png" width="500" height="213" /></a><p>Breakthrough 48-Hour Ban Repeal Provides
Public Adjusters With a Significantly Wider
Business Channel for 2011...</p></li>
</ul>
</div>
</div>
</div>
</div>
</div>
I think this has something to do with collapsing margin effect. But not sure how to resolve. Thanks for response.