Barton68
05-07-2007, 11:28 AM
I'm new to HTML, but have been programming as a career for over 18 years, and HTML/CSS is driving me mad.
I've moved away from the use of tables to DIV tags, but just can't get them working across the majority of browsers.
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
The DIV cells have a border. With Tables this is easy, but the 2nd spacer doesn't work, i.e. no space being displayed.
C++ is a doddle to this!
Thanks,
Barton
CSS:
/************ Table format replacements **************/
.table-div {
display: table;
width:660px;
border-spacing:5px;/*cellspacing:poor IE support for this*/
border-collapse:separate;
}
.row-div {
display: table-row;
width:auto;
}
.cell-div {
display: table-cell;
float:left; /* fix for buggy browsers*/
width:200px;
background-color:#a6bf79;
border:2px solid #ffffff;
color:#000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1px;
padding: 0px;
text-align: center;
}
.spacer-cell-div {
float:left;/*fix for buggy browsers*/
display: table-cell;
width:25px;
}
HTML:
<div class="table-div">
<div class="row-div">
<div class="cell-div">
<a href...><img src="images/DC.jpg" alt="Council Online" />
</div>
<div class="spacer-cell-div">
</div>
<div class="cell-div">
<a href...><img src="images/town.jpg" alt="Local Info" /></a>
</div>
<div class="spacer-cell-div">
</div>
<div class="cell-div">
<a href...><img src="images/travel.jpg" alt="Travel Local Info" /></a>
</div>
</div>
</div>
I've moved away from the use of tables to DIV tags, but just can't get them working across the majority of browsers.
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
A HREF-IMG spacer A HREF-IMG spacer A HREF-IMG
The DIV cells have a border. With Tables this is easy, but the 2nd spacer doesn't work, i.e. no space being displayed.
C++ is a doddle to this!
Thanks,
Barton
CSS:
/************ Table format replacements **************/
.table-div {
display: table;
width:660px;
border-spacing:5px;/*cellspacing:poor IE support for this*/
border-collapse:separate;
}
.row-div {
display: table-row;
width:auto;
}
.cell-div {
display: table-cell;
float:left; /* fix for buggy browsers*/
width:200px;
background-color:#a6bf79;
border:2px solid #ffffff;
color:#000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1px;
padding: 0px;
text-align: center;
}
.spacer-cell-div {
float:left;/*fix for buggy browsers*/
display: table-cell;
width:25px;
}
HTML:
<div class="table-div">
<div class="row-div">
<div class="cell-div">
<a href...><img src="images/DC.jpg" alt="Council Online" />
</div>
<div class="spacer-cell-div">
</div>
<div class="cell-div">
<a href...><img src="images/town.jpg" alt="Local Info" /></a>
</div>
<div class="spacer-cell-div">
</div>
<div class="cell-div">
<a href...><img src="images/travel.jpg" alt="Travel Local Info" /></a>
</div>
</div>
</div>