bgcolor

B

booner

I have a table that I alternate each rows color:

<table>
<tr bgcolor="White">
<td>row 1</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 2</td>
</tr>
<tr bgcolor="White">
<td>row 3</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 4</td>
</tr>
</table>

I have a few users who say they do not see the alternating coloring. I went
in and changed the #F2F2F2 to Blue and they do see that.

We are using Internet Explorer.

Any pointers to what the issue may be.

BBB
 
R

rf

booner said:
I have a table that I alternate each rows color:

<tr bgcolor="White">
<tr bgcolor="#F2F2F2">
I have a few users who say they do not see the alternating coloring. I went
in and changed the #F2F2F2 to Blue and they do see that.

#f2f2f2 is so close to white as to be indistuishable, expecially if your
viewer has their monitor brightness/contrast set incorrectly. Perhaps they
are also using 16 bit colour instead of 32.

Blue, on the other hand, is very different to white.

Cheers
Richard.
 
H

hywel.jenkins

booner said:
I have a table that I alternate each rows color:

<table>
<tr bgcolor="White">
I have a few users who say they do not see the alternating coloring. I went
in and changed the #F2F2F2 to Blue and they do see that.

We are using Internet Explorer.

Any pointers to what the issue may be.

You're using made up attributes. There's no such thing as "bgcolor".
Use CSS on the cells instead.
 
J

Jonathan N. Little

booner said:
I have a table that I alternate each rows color:

<table>
<tr bgcolor="White">
<td>row 1</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 2</td>
</tr>
<tr bgcolor="White">
<td>row 3</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 4</td>
</tr>
</table>

I have a few users who say they do not see the alternating coloring. I went
in and changed the #F2F2F2 to Blue and they do see that.

We are using Internet Explorer.

Any pointers to what the issue may be.


First 'white' is #FFFFFF, so #F2F2F2; is only 8/256 or 3% black a very
light gray it maybe more to do with the color depth of their display
then a browser issue.

Second, use CSS, because to change your table you have to change every
row code whereas with CSS all you have to change is one CSS entry:

..evenrow { color: black; background-color: white; }
..oddrow { color: black; background-color: aqua; }

<table>
<tr class="evenrow">
<td>row 1</td>
</tr>
<tr class="oddrow">
<td>row 2</td>
</tr>
<tr class="evenrow">
<td>row 3</td>
</tr>
<tr class="oddrow">
<td>row 4</td>
</tr>
</table>
 
B

booner

I was trying to simplify things - I have in fact used CSS - and done very
similar to what you described (the table is created dynamically in ASP).
 
R

Rincewind

I have a table that I alternate each rows color:

<table>
<tr bgcolor="White">
<td>row 1</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 2</td>
</tr>
<tr bgcolor="White">
<td>row 3</td>
</tr>
<tr bgcolor="#F2F2F2">
<td>row 4</td>
</tr>
</table>

I have a few users who say they do not see the alternating coloring. I went
in and changed the #F2F2F2 to Blue and they do see that.

We are using Internet Explorer.

Any pointers to what the issue may be.

BBB

As all seems well in my three different browsers, I can only assume they
can't see it because there is so little contrast between #f2f2f2 and #fff,
remember that not everyone has perfect eyesight and that a large proportion
of the male population suffer from some form of colour blindness.
 
B

booner

Was kind of my thinking - I sent her a screen shot (saved as a jpg) - and
she doesn't see the alternating colors on her screen.

However, goes over to a co-workers machine - and she can (physically) see
the alternating colors on that machine.

So something about that machine cannot display that color - going to try
darkening it a bit.
 
B

Beauregard T. Shagnasty

booner said:
I was trying to simplify things - I have in fact used CSS - and done
very similar to what you described (the table is created dynamically
in ASP).

Even easier, then.

Within your loop:

intCount = 0
Do While Not oRs.EOF
intCount = intCount + 1
Response.Write "<tr>"
If intCount Mod 2 = 0 Then
strBgColor = "#ffffcc"
Else
strBgColor = "#ffffff"
End If
%>

<td style="background-color: <%= strBgColor%>"> <%= [yourvariables]
%></td>
<%
Response.Write "</tr>"
....

You could even eliminate the style on every other row, if it was to
match the background of the table or page...
 
J

Jonathan N. Little

Beauregard said:
booner wrote:

I was trying to simplify things - I have in fact used CSS - and done
very similar to what you described (the table is created dynamically
in ASP).


Even easier, then.

Within your loop:

intCount = 0
Do While Not oRs.EOF
intCount = intCount + 1
Response.Write "<tr>"
If intCount Mod 2 = 0 Then
strBgColor = "#ffffcc"
Else
strBgColor = "#ffffff"
End If
%>

<td style="background-color: <%= strBgColor%>"> <%= [yourvariables]
%></td>
<%
Response.Write "</tr>"
...

You could even eliminate the style on every other row, if it was to
match the background of the table or page...

Still would think using a class styling would be better option than
hard-coding the color into the ASP function. Then if later down the road
the site changes color schemes where now said table becomes illegible
you have to change the APS function. You can coordinate the change
better with CSS...

my $.02
 
N

Neredbojias

With neither quill nor qualm, booner quothed:
Was kind of my thinking - I sent her a screen shot (saved as a jpg) - and
she doesn't see the alternating colors on her screen.

However, goes over to a co-workers machine - and she can (physically) see
the alternating colors on that machine.

So something about that machine cannot display that color - going to try
darkening it a bit.

If she's a woman (-which I certainly hope), she probably uses the
monitor to put on her makeup and automatically tunes-out subtle contrast
differences not associated with her mug. So buy her a mirror. If she
doesn't crack it, problem solved.
 
B

Beauregard T. Shagnasty

Jonathan said:
Still would think using a class styling would be better option than
hard-coding the color into the ASP function. Then if later down the road
the site changes color schemes where now said table becomes illegible
you have to change the APS function. You can coordinate the change
better with CSS...

Oh sure, I agree. This was just a quick'n'dirty solution, one that I
found in a search of my own really old asp code. (I have since dumped
all the MS stuff.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,112
Latest member
VinayKumar Nevatia
Top