Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS Won't show all styles

Status
Not open for further replies.

dom24

Programmer
Aug 5, 2004
218
GB
Not really used style sheets before so can anyone help with the following?
The link styles work but it won't show the image or text style in the body tag. It shows them when I haven't got the link styles in though.

<STYLE>
BODY
{
BACKGROUND-IMAGE: url(images/LDwatermark.png);
BACKGROUND-POSITION: left top;
BACKGROUND-REPEAT: no-repeat;
COLOR: navy;
FONT-FAMILY: 'MS Sans Serif';
FONT-SIZE: 10pt;
FONT-WEIGHT: bolder
}
A:visited
{
COLOR: #00ff00
}
A:hover
{
COLOR: #ff00ff
}
A:active
{
COLOR: #0000ff
}
BODY TABLE
{
BACKGROUND-COLOR: #cbd7fc;
COLOR: navy;
FONT-FAMILY: 'Courier New';
FONT-SIZE: 12pt;
FONT-STYLE: italic;
FONT-VARIANT: small-caps;
FONT-WEIGHT: bolder;
TEXT-TRANSFORM: capitalize
}
OPTION
{
COLOR: navy;
FONT-FAMILY: 'MS Sans Serif'
}
INPUT
{
COLOR: navy;
FONT-FAMILY: 'MS Sans Serif'
}
.right
{
TEXT-INDENT: 20%
}
TABLE
{
COLOR: aqua;
FONT-FAMILY: Arial
}
</STYLE>
 
Nope, still doesn't like it.
The link styles work ok, it's just the rest around it.
And the rest works without the link styles. ???
 
What is "BODY TABLE"? You already have a style defined for BODY and a style defined for TABLE.

Additionally, when you're trying to define styles for two separate tags the same way, it should be like the following:

[tt]
BODY[red],[/red] TABLE
{
BACKGROUND-COLOR: #cbd7fc;
COLOR: navy;
FONT-FAMILY: 'Courier New';
FONT-SIZE: 12pt;
FONT-STYLE: italic;
FONT-VARIANT: small-caps;
FONT-WEIGHT: bolder;
TEXT-TRANSFORM: capitalize
}
[/tt]

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
When I was using visual interdev it just put the table tag inside the body tag that's all. It was working ok until I added the link styles so I just left it.
 
So if you remove that, does it work?

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
Nope! All the tags inside the class folder work fine, it's just that I wanted to save myself having to go in and adding more tags by using the body and table tags that are already there. It's really wierd cos it was working fine before.
 
TABLE will overide settings in BODY TABLE.

Also, styles set for body tags do not cascade to tables in some browsers.

Can you post the HTML that is using these styles?

hint: use
Code:
 tags in your post as it makes it easier to read.

[URL unfurl="true"]http://www.foamcow.com[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top