HighDots Forums  

GridLines or borders around cells disappear in Firefox

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss GridLines or borders around cells disappear in Firefox in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
shah.jigar@gmail.com
 
Posts: n/a

Default GridLines or borders around cells disappear in Firefox - 08-08-2007 , 06:05 PM






Hi all,
I have the following code for which I need borders around all the
cells irrespective of their background color or even if they are
empty. There needs to be grids or borders. Somehow this just doesn't
work in Firefox 2.0. Any suggestions would be helpful. Thanks. I was
trying to create static headers thats why the extra code.

<style>
table{
empty-cells: show;
}
..container
{
border: 1pt solid black;
height: 150px;
width: 100%;
overflow: auto;
}
..Freezing
{
position:relative ;
top:expression(this.offsetParent.scrollTop-2);
z-index: 10;
background-color: white;
}
</style>
<div class="containerIE2" id="containerIE2">
<table rules="all" border =1 width="80%" style="border-
collapse:collapse;">
<tr>
<th>Col1></th><th>Col1></th><th>Col1></th><th>Col1></th></tr>
<tbody class="container">
<tr><td style="color: White; background-color: White;"> </td>
<td style="background-color: Lime;">vow</td>
<td>3</td></tr><tr><td bgcolor="Lime">nothing again</td><td></
td><td>3</td></tr>
<tr><td style="background-color: White;"></td>
<td style="color: Lime; background-color: Lime;"></td><td>3</td>
</tr><tr><td style="background-color: White;"></td>
<td style="color: Lime; background-color: Lime;"></td><td>3</td>
</tr><tr>
<td style="background-color: White;"></td>
<td style="color: Lime; background-color: Lime;"></td><td>3</td>
</tr><tr><td style="background-color: White;"></td>
<td style="color: Lime; background-color: Lime;"></td><td>3</td>
</tr><tr><td style="background-color: White;"></td>
<td style="color: Lime; background-color: Lime;"></td><td>3</td>
</tr>
</tbody>
</table>
</div>


Reply With Quote
  #2  
Old   
dorayme
 
Posts: n/a

Default Re: GridLines or borders around cells disappear in Firefox - 08-08-2007 , 06:21 PM






In article
<1186614347.342551.266030 (AT) g4g2000hsf (DOT) googlegroups.com>,
shah.jigar (AT) gmail (DOT) com wrote:

Quote:
Hi all,
I have the following code for which I need borders around all the
cells irrespective of their background color or even if they are
empty. There needs to be grids or borders. Somehow this just doesn't
work in Firefox 2.0.
....snip some mangled code

If you want borders around the table and or td, you can have them:

table {border: 1px solid #000;}

and/or

td {border: 1px solid #000;}

--
dorayme


Reply With Quote
  #3  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: GridLines or borders around cells disappear in Firefox - 08-09-2007 , 05:56 AM



Scripsit shah.jigar (AT) gmail (DOT) com:

Quote:
I have the following code
In future, please post a URL, not a copy of code. Hang around for a week or
so, and you'll see explanations for this.

Quote:
for which I need borders around all the
cells irrespective of their background color or even if they are
empty. There needs to be grids or borders.
Then use <td>&nbsp;</td> for the empty cells. If however those cells need to
be smaller than what a poor lonesome no-break space needs, use a
single-pixel transparent image. More info:
http://www.cs.tut.fi/~jkorpela/html/emptycells.html

Quote:
Somehow this just doesn't
work in Firefox 2.0.
I'd be more worried about IE, which ignores the empty-cells property.

I can't tell what really happens on Firefox here. Even setting
td { border: solid 1px red!important }
doesn't seem to help, for the empty cells. Neither does it help to use
&nbsp;. But when I remove the CSS code that makes the tbody scrollable, the
borders are there.

I'd say that the idea of creating static headings by making the tbody
scrollable, though feasible in theory, just doesn't work in practice. It
does not work at all on IE, so in terms of WWW authoring, it's not very
useful. You would need to use two tables, one for the headings and one
(wrapped inside a div to please IE) for the data cells and made scrollable.
Then the question is how to make their column widths match becomes crucial,
and the answer is unfortunately that you need to set the widths explicitly.

Quote:
Any suggestions would be helpful. Thanks. I was
trying to create static headers thats why the extra code.
I won't work that way on IE. By the way, on IE 7, your all rows have 150px
height. Apparently IE recognizes width: 150px for the tbody element but
incorrectly applies it to all _rows_.

Besides, you have headers (<th>) for four columns but only three columns of
data.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Detailed CODE: Re: GridLines or borders around cells disappear in Firefox - 08-09-2007 , 04:02 PM



Scripsit shah.jigar (AT) gmail (DOT) com:

Quote:
I am sorry that I didn't put the full code out there.
Which part of my advice "In future, please post a URL, not a copy of code.
Hang around for a week or so, and you'll see explanations for this." did you
fail to understand?

Quote:
td style="color: White; background-color: White;"> </td
td style="background-color: Lime;">vow</td
Sorry, my doctor has forbidden me from reading such a mess. Learn how to use
classes, mm'kay? Maybe you could start by forgetting that you ever heard of
style="..." attributes.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #5  
Old   
shah.jigar@gmail.com
 
Posts: n/a

Default Re: Detailed CODE: Re: GridLines or borders around cells disappear in Firefox - 08-10-2007 , 09:44 AM



so you have no solution that can do a fixed header that works on IE
and firefox and one that doesn't involve use of two tables? This guy's
close http://blogs.crankygoblin.com/blogs/.../02/49529.aspx
but his solution doesnt' have grids.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.