I'm trying to create a page which looks somewhat like this:
http://www.drmichaelbogdan.com/plastic-surgery/
(I'm referring to the "Find Out More About Our Featured Procedures:" table with alternating colors).
I prefer to refrain from using tables, since from what I understand, it is much wiser to use "pure" css.
Alas, I my CSS skills are somewhat lacking.
Is there anyone out there which can help me create this look in CSS?
my HTML "structure" looks like this:
<div id="latestArticlesWrapper">
<div class = "newArticle">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
</div>
</div>
<div class = "newArticle">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
</div>
</div>
<div class = "newArticle">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
</div>
</div>
<div class = "newArticle">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
</div>
</div>
<div class = "newArticle">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
</div>
</div>
</div>
If needed, and if you think that it'll help, I can change the tags from "div" to anything you say, as long as it "helps the cause" :-) (perhaps for the odd/even requirement - the divs are created in a loop...)
Obviously, it should look good on all major browsers (Firefox, Chrome and IE for that matter).
Well, as usual - IE is giving me problems. It looks great on Firefox, it really does, but on IE - it gets messed up
I did change the html and CSS a bit, here is what I am using now:
HTML:
<div id="latestArticlesWrapper">
<div class = "<%= (oddEven = !oddEven) ? "newArticle white" : "newArticle yellow"%>">
<div class = "newArticleImage">
</div>
<div class="newArticleData">
<span class="newArticleTitle"></span>
<span class="newArticleDate"></span>
<span class="newArticleContent"></span>
<span class="newArticleLink"></span>
</div>
</div>
</div>
CSS:
#latestArticlesWrapper {
width:100%;
font-size:12px;
font-family:Arial, Helvetica, sans-serif;
text-align:justify;
}
.newArticle {
height:146px;
}
.yellow {
background:#F2E4C2;
}
.white
{
background:#fff;
}
.newArticleImage {
width:96px;
height:96px;
margin-right:20px;
margin-top:10px;
float:right;
}
.newArticleData {
margin-right:20px;
margin-top:10px;
float:right;
width:404px;
}
.newArticleData h3 {
padding:0;
margin:0;
margin-bottom:3px;
}
.newArticleTitle
{
float: right;
}
.newArticleDate
{
float: left;
padding-left: 5px;
padding-right:20px;
background:url(../images/icons/date.png) right no-repeat;
}
.newArticleContent
{
float: right;
}
.newArticleLink
{
float: left;
}
So.... How do I make IE happy? :-P