Moonlit
06-28-2004, 10:21 PM
I put this is my code:
<font size="-1" class="textbg" class="bluetxt">
But only the class="textbg" is working...not the second class. Is this wrong?
kittycat
06-28-2004, 10:50 PM
You can't specify two classes, only one. So you'd have to remove one or combine the classes to make one class/id. But you can specify a class and an id for one thing(I think..)
1. kinda useless using a FONT tag in conjunction with CSS coding, but life goes on i guess.
2. try this...
class="textbg bluetxt"
Moonlit
06-30-2004, 08:21 AM
Why is it useless?
This didn't work: class="textbg bluetxt"
Is there something else I can do so that I can get the background of my text to be black and the font color blue?
MaGiCSuN
06-30-2004, 02:38 PM
yes, add the background color to the other class :rolleyes:
that's where classes are for ;)
i think what pb&j means it's kinda useless because you are using a <font> tag. I would use a <div> or <span> myself.
Love,
Mirna
my apologies for calling useless. that is a personal opinion.
css is used for formatting, thus the FONT tag is old news, a thing of the past, put out to pasture...
if you are going to use css to format an area, it is best to use it with a SPAN or DIV area as Mirna pointed out.
to get your desired effect, it seems your only solution left would be to create a new class and have your wanted features in it.
Moonlit
07-01-2004, 12:27 AM
Okay...I'm not familiar with how to do that with Span or DIV....
If I create a new class, can I have both features in it?
kittycat
07-01-2004, 05:07 PM
Yes, you can have as many attributes in a class as you want.
Using span or div is exactly like the font tag, only you replace the word font with whichever you're going to use
Moonlit
07-03-2004, 11:50 PM
So what is the difference between Span and DIV?
And what exactly do I put in my CSS?
This is what I have now....
.textbg { background-color: #000000; }
.bluetxt { color: #0000FF; }
So is it <span="textbg" "bluetxt"> ?
Or do I have to separate them?
Thanks a lot for the help.
kittycat
07-03-2004, 11:56 PM
Combine your CSS
.newclass { background-color: #000000; color: #0000FF; }
You use a span like this
<span class="newclass">text</span>
Moonlit
07-04-2004, 03:49 AM
Ah, I see. Thanks very much!
MaGiCSuN
07-05-2004, 08:59 PM
So what is the difference between Span and DIV?
div is more used for pieces of text, while span can be used for only one word or line. also a div creates a block around the text, while a span tag leaves the text as it is on the webpage.
Example if you use this sentence:
this sentence uses a div and a span
and you put a div around the word "div" then it will look like this:
this sentence uses a
div
and a span
while using a span tag it will just look like this:
this sentence uses a div and a span
it doesn't break up the text and still styles the text with the css you give it :)
Love,
Mirna