I've been pulling my hair out over this! Maybe someone who knows CSS better than I can see what's wrong. I am using styles to create rows and columns (no tables) which is working fine but one "cell" cannot have the width hard-coded so its background color stops at the end of the content. I tried creating a container with the background color that should have applied to the whole row but it was ignored so I am currently using two styles for each "cell".
Each column has something like this but the others have the width hard-coded; this one has it set to auto.
The HTML of a sample row is something like this but the actual content and whether it's a RowColor or AltRowColor is dynamic through MySQL and PHP, as is the content:
RowColor is (AltRowColor is similar but with a different color):
Any ideas how to get the background color to not have the gap after the content of Col6?
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases
Each column has something like this but the others have the width hard-coded; this one has it set to auto.
Code:
.Col6 {
font-family: Verdana, Arial, sans-serif;
font-size: small;
font-weight: normal;
text-align: left;
margin-top: 5px;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
padding-left: 10px;
padding-right: 10px;
width: auto;
float: left;
position: relative;
}
The HTML of a sample row is something like this but the actual content and whether it's a RowColor or AltRowColor is dynamic through MySQL and PHP, as is the content:
Code:
<div class="Col1 RowColor">Agent Cooper</div>
<div class="Col2 RowColor">601T-3</div>
<div class="Col3 RowColor">(800) 123-4567</div>
<div class="Col4 RowColor"> </div>
<div class="Col5 RowColor">18</div>
<div class="Col6 RowColor">Yes</div>
<div class="Col7 RowColor">City Name</div>
RowColor is (AltRowColor is similar but with a different color):
Code:
.RowColor {
background-color: #EBEBEA;
font-size: small;
font-weight: normal;
padding-top: 0px;
padding-bottom: 5px;
position: relative;
}
Any ideas how to get the background color to not have the gap after the content of Col6?
Don
Experienced in HTML, Perl, PHP, VBScript, PWS, IIS and Apache and MS-Access, MS-SQL, MySQL databases