HighDots Forums  

row background

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


Discuss row background in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Nik Coughlin
 
Posts: n/a

Default Re: row background - 01-13-2009 , 06:44 PM






"Mike" <ampeloso (AT) gmail (DOT) com> wrote

Quote:
Unfortunatly its part of a form and Database form and I dont need
anyone messing with it.
Presumably this is in relation to our asking you to post an URL?

In this case, with the page being dynamic, you should save the output of the
page (ie what you see when you go to View Source in your browser) along with
any style sheets, scripts, images or other resources used and post the
resulting "static" copy of the page in question to a temporary url, on one
of the many free hosts if you don't have anywhere better to put it.



Reply With Quote
  #12  
Old   
Bergamot
 
Posts: n/a

Default Re: row background - 01-13-2009 , 07:05 PM







Jukka K. Korpela wrote:
Quote:
Bergamot wrote:

If I set them with a class in the tr they dont render.
Put the class on the tr and use descendant selectors to apply the
color to the td's in that row.

If you set background for tr, then this background will shine
through in the cells
Well dang, I've been doing the descendant selectors for so long I don't
even remember why, but I know there was a reason. Maybe because I
don't usually want a solid color row, but prefer the spacing between
cells to be a different color.

--
Berg


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

Default Re: row background - 01-14-2009 , 03:04 PM



Bergamot wrote:

Quote:
Jukka K. Korpela wrote:
Bergamot wrote:

If I set them with a class in the tr they dont render.
Put the class on the tr and use descendant selectors to apply the
color to the td's in that row.

If you set background for tr, then this background will shine
through in the cells

Well dang, I've been doing the descendant selectors for so long I
don't even remember why, but I know there was a reason.
I guess the reason was the one mentioned in this thread: old browsers that
once ruled the earth. On the other hand, using
tr.foo td, tr.foo th
isn't much more complicated (or less natural) than using
tr.foo
so I don't oppose the idea of continuing the older way.

Technically, there's a difference - between setting background for td and th
cells directly (even though based on a contextual selector that has a class
for the parent element) and setting it for tr. In the latter case, _any_
setting of background color for a cell directly, in any stylesheet, no
matter how much lower in the cascade, will prevent the tr color from shining
through. (Whether this matters and whether it is good or bad depends on the
circumstances.)

Quote:
Maybe
because I don't usually want a solid color row, but prefer the
spacing between cells to be a different color.
Pardon? As far as I can see, there's no difference: even if you set
background color for a tr, it will not appear between the cells. The spacing
between cells has the background color of the table element. Disclaimer:
Older browsers may deviate.

--
Yucca, http://www.cs.tut.fi/~jkorpela/



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 - 2009, Jelsoft Enterprises Ltd.