Click to See Complete Forum and Search --> : Add css into page


aoeguy
09-02-2003, 08:20 AM
How can I just create a class in a page like this:

Class = SubNav
border-width = 1
border-style = outset
etc.....

Aoeguy

DaveSW
09-02-2003, 08:48 AM
In the head section:

<style type="text/css"> <!--
.subnav {
border: 1px solid #cc0000;
somethingelse: something;
}
--></style>

(replace something obviously...)

In the body

<div class="subnav">Content</div>

<span class="subnav">Content</span>

<td class="subnav">Content</td>

<a href="somewhere.htm" class="subnav">Content</a>

Etc. OK?

aoeguy
09-02-2003, 08:56 AM
How can I add background images?


my code:

<style type="text/css">
.nav_title {
border: 4px groove white;
picture:marble_bg.jpg;
}
</style>

And can I add another class like this?:

<style type="text/css">
.nav_title {
border: 4px groove white;
picture:marble_bg.jpg;
}
.nav_content {
bla bla
bla bla
}
</style>


Aoeguy

DaveSW
09-02-2003, 09:23 AM
<style type="text/css"> <!--
.nav_title {
border: 4px groove white;
background-image: url(marble_bg.jpg);
}
.nav_content {
bla bla
bla bla
}
--></style>
Yes, and:
Don't forget the html comment stuff to hide the code from old browsers.

aoeguy
09-02-2003, 09:26 AM
What comment sruff?

DaveSW
09-02-2003, 09:34 AM
the

<!--


and


-->

around the content. I put it in the first, you took it back out on yours, so I thought I'd remind you.

aoeguy
09-02-2003, 09:43 AM
Does that work with other code too?
Dont you meen to say Editors not browsers?

DaveSW
09-02-2003, 10:26 AM
"Does that work with other code too? "

just css I think

"Dont you meen to say Editors not browsers?"

Browsers. Old Old very Old browsers!! e.g. ie 2.something. Dunno about 3. before my time...