PDA

View Full Version : tables/css


devilmunchkin
27-08-2003, 03:37:39
my boss wants me to completely stylize (down to color,font..EVERYthing) using a css style sheet. I'm not sure it can be done because different parts of the sheet need to be different colors. would it help if i bought a css book or should i bother? is this possible?

Sir Penguin
27-08-2003, 04:23:55
For each tag, you can define different styles, and then say which of the classes of style you want to use when you're using the tag.

In theory, one uses HTML to define the content and structure of a document, and CSS to define the style of various parts of the HTML.

SP

Nav
27-08-2003, 10:54:49
create a separate file called 'style.css', in that you will write the style definitions that you will use throughout your HTML document.


.style1 {
color: #FFFFFF;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
background-color: #000000
}
.style2 {
color: #000000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px
font-weight: bold;
background-color: #FFFFFF
}


Inbetween the <HEAD> tags in your HTML document include this line.

<link rel="stylesheet" href="style.css" type="text/css">

Example HTML code to use with the style. Note that to apply a style to a tag use the 'class' paramater.


<table>
<tr>
<td class="style1">Example Text</td>
<td class="stlye2">Example Text</td>
</tr>
</table>


That was very quick example, but I hope it sets you in the right direction!

devilmunchkin
28-08-2003, 03:40:08
yes yes..i know about all that. but how do you apply it to different parts of a table?

fp
28-08-2003, 08:09:10
Isn't Nav's example applying two different styles to two seperate cells of a table? I know jack about CSS and HTML, but that's what it looks like to me.

Funkodrom
28-08-2003, 08:12:03
Yep.

fp
28-08-2003, 08:45:33
Well then that's what dm wants, right?

Funkodrom
28-08-2003, 08:54:48
If it's not I don't understand her question.

Nav
28-08-2003, 13:56:38
same here.

devilmunchkin
29-08-2003, 04:07:05
ok..ok..i misread..i see...i tried that and it's kinda working...it's hard to describe. for instance, style one will work for part of what it's supposed to, but not all, even though i tag all the parts i want it to. make sense? i might have to save it and show you somehow, but i'll work more on it next week.
i guess it's a backwards complement that my boss wants me to do stuff i don't know how to do....

Darkstar
29-08-2003, 06:14:17
You can post it here using [ CODE ] opening tag around whatever you want to post with a closing [ /CODE ] tag. (And no spaced in between the [ -word- ] and the square brackets.

Nav
29-08-2003, 09:30:48
btw there's a typo in my html code if that was the problem.

devilmunchkin
31-08-2003, 02:43:52
nah..i typed in my own html code. i'll fug with it next week and if i can't figure it out, i'm sure i'll be back here whining for help :D