Hi,
Can someone confirm whether it's possible to set the background-color
property in CSS for a table row (<tr>)?
My code is:
table { display: table; table-layout: fixed; }
tr { display: table-row; }
td, th { display: table-cell; }
and...
table { text-align: left; border: 1px solid silver; font-size: 1em;
width: 100%; margin: 2px; }
td { padding: 0.3em; }
tr { border: 1px solid silver; }
tr.darker { background-color: #cccccc; }
tr.lighter { background-color: #f7f7f7; }
th { padding: 0.3em; }
Many thanks,
Matt :) 9 56214
Matt Bostock <ma**@mattbosto ck.com> wrote: Can someone confirm whether it's possible to set the background-color property in CSS for a table row (<tr>)?
Indirectly:
tr.classname td{background-color:#aaa}
tr { display: table-row; } td, th { display: table-cell; }
Specifying default values is normally pointless.
--
Spartanicus
Spartanicus schrieb: Matt Bostock <ma**@mattbosto ck.com> wrote:
Can someone confirm whether it's possible to set the background-color property in CSS for a table row (<tr>)?
Indirectly:
Directly too. You cannot see it of course, when the table cells have a
non-transparent background color.
<http://www.w3.org/TR/CSS21/tables.html#tab le-layers>
Not in this case :) I'm using 'body *' selectors at the start of my
stylesheets to reduce browser inconsistencies .
Matt
Spartanicus wrote: Matt Bostock <ma**@mattbosto ck.com> wrote:
Can someone confirm whether it's possible to set the background-color property in CSS for a table row (<tr>)?
Indirectly:
tr.classname td{background-color:#aaa}
tr { display: table-row; } td, th { display: table-cell; }
Specifying default values is normally pointless.
Christoph Päper wrote: Directly too. You cannot see it of course, when the table cells have a non-transparent background color. <http://www.w3.org/TR/CSS21/tables.html#tab le-layers>
Thanks! I'll try that :)
Hi Christopher,
That didn't work for me (I set the td's background-color to
'transparent'). I'm using Firefox 1.04. Am I missing something?
Matt
Christoph Päper wrote: Directly too. You cannot see it of course, when the table cells have a non-transparent background color. <http://www.w3.org/TR/CSS21/tables.html#tab le-layers>
Matt Bostock schrieb: Hi Christopher,
Hello Matze! <http://www.w3.org/TR/CSS21/tables.html#tab le-layers>
That didn't work for me (I set the td's background-color to 'transparent'). I'm using Firefox 1.04. Am I missing something?
I expected you'd say you're using IE, which has problems in this area.
Firefox should be fine.
In <http://webdesign.criss ov.de/temp/table-layers.html> all cells, where
the first number is odd and the second is even, should have a blue
background. I suppose you miss something in your code, which you didn't
show us (completely). This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Markus Mohr |
last post by:
Hi, everyone,
I have a special problem:
For every monitor resolution in 200 pixel steps from 800 to 1600
pixels I have an image to be shown as centered background-image.
Those images all have the same name and reside in the following
physical path structure:
|
by: Mimo Zus |
last post by:
I'm hoping that someone can explain what's going on; better yet provide
a workaround.
I'm designing a centered CSS site based on a 550 pixel wide vertical
background image. Onto this background I built a two column layout
with nested navigation and content divs. The background image is
centered via "background: ... center;", the divs are centered
over it via "margin: 0 auto 0 auto;".
The problem I'm having in IE6 is inconsistent...
|
by: Gequina |
last post by:
Something goes wrong in my script. I'm all new to it so i don't know
much yet.
I have a set of buttons. And when you click on either of them, the
background image will change. Only it's not working. It works when i
click on one, but then when i want to click on another, it's not
working.
What am i doing wrong?
thanks in advance
|
by: ribinha |
last post by:
Hi all,
I am having problems loading background images on my pages. I have
created a css to display the images. It works just fine on my test box,
but when I tried on real pages it wont upload any images everythin else
displays just fine. I used a table and added a background image to
every row. when i call the page it shows that it is preloading images
but never displays. I have tried to place the css code on the page
itself as well. the...
|
by: Viken Karaguesian |
last post by:
Hello all,
I need somehelp with background tiling. I have a sneaking suspicion that
what I want to do is not possible, but I'll ask anyway. :>) First some
background: Here's the site in question: www.sayatnova.com (I'm sure many of
you have seen this before as I've often asked for help).
I've come a long way since I first created the site many moons ago and I'm
trying to convert it to a (1) Table-less, (2) Frame-less and (3) Validated...
| |
by: Jeb Hunter |
last post by:
Well, how can I describe this succinctly? I have a page with DIVs that us
background images to produce a border effect. It works perfectly well, but
I want to make up (for now) 3 different border/background effects. Rather
than duplicate the entire chunk of CSS 3 times, I thought "Gee, I should
only have to specify the 3 backgrounds (all the other placement directives
would be identical). However I must not be correctly specifying the...
|
by: KNDesign |
last post by:
I've set a background image to repeat-y and at 100% height. It appears
fine when I open the window, but when I resize to a smaller height so
that I must scroll down to see the rest, the background image is
suddenly gone from the bottom.
#background {
position: absolute;
top: 0px;
bottom: 0px;
left: 50%;
|
by: Rob |
last post by:
Hello,
I'm sure this has come up before. I have need for a collection of all
elements/objects in an HTML document that have any kind of an
attribute (HTML or CSS) that is making use of a URL to display an
image. document.images only seems to reference image tags. The
collection needs to include background images, input type = image,
image maps, css assigned background, etc. Honestly, I am probably not
aware of all the possibilities...
|
by: nicky77 |
last post by:
Hi, I've created a nav bar using a background image for rollover effects. Everything works as I had hoped, however, for some reason it seems that an area of whitespace (the same size of the background image) is hyperlinked underneath the nav bar. I can't see any errors in the coding below. Any ideas what may be causing this?
the page is at http://www.maguiresonline.co.uk/wosis/files/nickysnav.html
the html....
<body...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |