Posted by tubby on September 4, 2009 at 5:26pm
hi,
i'm editing my css and whenever i attempt to change the following to have a transparent or image background, it changes both the odd and even to a gray background. is there anyway to specify no background color? simply removing it doesn't work.
sorry, forgot to add i'm using Acquia Marina
thanks
tr.even td {
background-color: #E3ECC0;
border-bottom: 1px solid #CCC;
}
tr.odd td {
background-color: #FDFFEF;
border-bottom: 1px solid #CCC;
}
Comments
reply to odd/even background
for color just type transparent
yeah, i sorta already did
yeah, i sorta already did that. as i mentioned, it doesn't work. at least not in Firefox. haven't checked it in IE. and yes, i cleared my cache.
when you change it to anything but a color, it produces a table with a grey background.
figured it out. dawned on
figured it out. dawned on me that another css might be at play. this file was causing the background to be grey even if you changed it via the theme. i know you're not supposed to edit the core files but not sure how to get around it in this case.
/public_html/drupal/modules/system/system.css
tr.even, tr.odd {
background-color: #eee;
padding: 0.1em 0.6em;
}
Did you try adding this to
Did you try adding this to your theme's css file:
tr.even, tr.odd {
background-color: transparent;
}
I wasn't entirely certain if you had or not.
Jenni Simonis
http://www.forwardsupport.com
Jenni Simonis
http://www.forwardsupport.com
hey, those values already
hey,
those values already existed in the theme. the code i quoted in the original post came directly from the marina theme.
also that's not the point. as long system.css is included, even if you make the values transparent in the theme's css, the background-color specified in system.css will take over.
so you have to change system.css if you want a transparent/no background color.
lata
I was pretty sure that I was
I was pretty sure that I was able to change it in the past, as your theme css file loads after the system one, which means it supersedes anything in that file.
Jenni Simonis
http://www.forwardsupport.com
Jenni Simonis
http://www.forwardsupport.com
it's really not that
it's really not that serious.
you probably changed the background color to another color. if so, the theme color would negate whatever is specified in system.css
but if you make it transparent, then what is underneath, the system declaration, will show. hence, i got a grey background.
Thank you tubby
Thank you very very much tubby!
Your code in the first post help me understand the odd/even issue that i couldn't fix in my style.css. After hours of breaking my newbie head i finally did it! Thanks again.
Im using corporate theme, and change this code:
.content table {
background: #ececec;
border: 1px solid #bbbbbb;
}
.content th {
background: #dbdbdb;
padding: 5px 4px;
text-shadow: 1px 1px #fff;
border-right: 1px solid #c8c7c7;
}
.content td {
background: #ebebeb;
color: #747474;
text-align: left;
padding-left: 4px;
border-right: 1px solid #c8c7c7;
border-bottom: 1px solid #c8c7c7;
}
for this:
.content table {
background: #f07b62;
border: 1px solid #bbbbbb;
}
.content th {
background: #f07b62;
padding: 5px 4px;
text-shadow: 1px 1px #fff;
border-right: 1px solid #c8c7c7;
}
tr.even td {
background-color: #f8f9ec;
border-bottom: 1px solid #CCC;
}
tr.odd td {
background-color: #E3ECC0;
border-bottom: 1px solid #CCC;
}
.content td {
text-align: left;
padding-left: 4px;
border-right: 1px solid #c8c7c7;
border-bottom: 1px solid #c8c7c7;
}
And now i have different colours per row.