Click to See Complete Forum and Search --> : CSS Within a Table, Not the Whole Page


Rebekah
11-04-2005, 08:54 PM
I want to use CSS in just a table, but every time I go to try, it takes over the whole page. I don't know what I'm doing wrong!

Can anyone help?

Rebekah

BonRouge
11-04-2005, 09:27 PM
Give the table an id - <table id="mytable">and precede your style rules with that.. eg. #mytable {
font-size:3em;
background-color:pink;
}
#mytable em {
color:red;
}

NogDog
11-04-2005, 09:27 PM
Hard to say without more details and preferably a link to the page in question or at least a copy-and-paste of the code here (using [code] or [html] vbscript tags).

Rebekah
11-04-2005, 09:51 PM
Okay, no laughing. ;)

My bf wants to do a Mystery Auction on eBay. We found a nice layout that he wants to use, but he's not HTML savvy at all. This is where I come in. I can do HTML and CSS, but I've never been able to do CSS without using it in the whole page.

You can view what I'm doing here (http://www.actlikeakid.com/extra/mystery/index.html). I'm trying to incorporate this into eBay's selling panel. If you don't do eBay, it gives a box and you have to start and end with html tags, but when I use CSS, it changes the whole look of that eBay page.

I'm just trying to make it to where it looks good inside eBay without changing the rest of eBay's page.

Rebekah

Siddan
11-05-2005, 09:19 AM
Well the links to the auction site doesnīt work, for me at least.

I am gussing you have no control over the tables? Since I believe Ebay is built on tables then it will be difficult to only target one specific table, unless that very table havenīt been given an ID already.
Then just assign your css codes to that specific tabe ID

kelly23
11-05-2005, 09:23 AM
You can just take the code and paste into ebay's description box. That's what I do and I just use inline styles.

Rebekah
11-05-2005, 11:22 AM
Thanks everyone, but I decided to make it all HTML. It seems like less of a headache than figuring out how to exclude the eBay interface. I tried naming the table & it didn't work. This was just easier. :)

Thanks again!

Rebekah

kiathau
11-15-2005, 10:05 PM
Why not

<table class="something">...</table>

.something
{
background-color:pink;
}

Kiat Hau,
http://webidiot.blogspot.com, Let's build your web site