# Quick CSS question

**URL:** https://forum.kirupa.com/t/quick-css-question/62942
**Category:** web dev
**Created:** [September 1, 2004, 7:59pm UTC](https://forum.kirupa.com/t/quick-css-question/62942 "2004-09-01T19:59:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![iloveitaly](https://avatars.discourse-cdn.com/v4/letter/i/7ea924/32.png) [@iloveitaly](https://forum.kirupa.com/u/iloveitaly)
#### Post date: [September 1, 2004, 7:59pm UTC](https://forum.kirupa.com/t/quick-css-question/62942/1 "2004-09-01T19:59:35Z")

</div>

Not an expert yet in CSS so i have stupid question…  
Lets say i make a class. I assign the class to a table tag. I want somehow the class to be able to define what the td tag of the table properties are (bgcolor, align, ect, ect). To my moderate knowledge of CSS that is not possible, but i would think there should be a way.  
I know you can globally assign a propertie to a specific tag, I.E.:

```auto

style
td {
background-color: red;
}
/style

```

But can you do that from ‘inside’ a class?

EDIT:  
I bumped off the \<\> on the style tags cause it was styling the page…lol 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 1, 2004, 9:22pm UTC](https://forum.kirupa.com/t/quick-css-question/62942/2 "2004-09-01T21:22:35Z")

</div>

yes… basically you’ll get something like this sample…

this is what a class would look like in your CSS the class tag specifically is the .table

```php
.table	{
	background-color:#740E10;
	background-image: url(img.jpg);
	background-repeat: repeat-x;
	background-position: bottom;
	margin: 0px;
	height: 235px;
	width: 100%;
	overflow: hidden;
	left: 0px;
	z-index: 1;
	position: absolute;
	top: 80px;
}

```

When you want to apply it you have your:

```php

<td class="table">

```

now everything in that table will take on the attributes of your CSS class, which overrides anything else you’ve tried to do to it… say like width and height, the CSS will take over.
