Style Sheet Problems

G

Guest

OK, I create a new style sheet, save it. create a new web page, link the
style sheet to it. save it. Click on the css file, and add a new custome
style to it. Save it. Go to the Web page and try to apply that style. It
cant be found. I tried saving both, reloading both, nothing works.

How am I do do this???

Steve
 
T

Thomas A. Rowe

Do you have a web / site open (File Menu | Open Web / Site) when doing this?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WebMaster Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
If you feel your current issue is a results of installing
a Service Pack or security update, please contact
Microsoft Product Support Services:
http://support.microsoft.com
If the problem can be shown to have been caused by a
security update, then there is usually no charge for the call.
==============================================
 
M

Murray

What is the new style rule you created? Sometimes rules cascade into the
page rather than being applied.
 
S

Steve Wetzel

I downloaded the SP-3 XP update and that has helped, I can now see some of
my created style sheets. I can see and apply stylesheets that have a totally
new name (like "redtext", or "bluetext"). They show up as .redtext and
..bluetext in the list and in the css. I cannot see or apply sheets with
names like "table.formatted" I assume this is because they are based on an
existing style. Is there a way I can see or apply thise? Am I missing
something or is this just a glitch in the program?

Steve
 
M

Murray

SP3?
I cannot see or apply sheets with names like "table.formatted"

That's not a sheet it's a style rule. It automatically applies to any table
given a class of "formatted", e.g.,

<table class="formatted"....>
 
S

Steve Wetzel

Thanks Murray, I see them now, I just have to go to the table or cell
properties to add them. I am new to HTML but is it really a style rule? I
dont think so, I think its just a class based on another class, like h2.red
would apply red text (if the style assigns red text) to the h2 format. I
can have h2.red, h2.blue. they are not applied automatically to all h2 text
but only are chosen if I specify h2.red.

At least that is the way it seems to work to me, but I am open to learning

Steve
 
M

Murray

table.formatted { color:red; }
/* this is a rule - the whole thing */
/* the color:red part is a style */
/* the table.formatted part is a selector */
/* the formatted part is a custom class name */
/* had it been something like the following */
table.formatted td p { line-spacing:24px; color:blue; }
/* then that is called a descendent selector, since you */
/* are specifying the descendent of the initial selector, i.e., */
/* all <p> tags, in table cells that belong to table class="formatted" */

Geddit?
 
W

Wally S

This is actually a convenience, as table.formatted is a class that can only
be applied to a table, so you will not see it in the list of classes unless
you have selected a table. This is a nice feature, as it keeps the list of
classes on the toolbar from being cluttered.

Wally S
 
M

Murray

table.formatted is not a class. ".formatted" is a class. "table.formatted"
is a selector to select any table on the page that has been given a class of
"formatted". The class is what is applied to the table. By doing that you
allow the selector to cascade into that particular table. And yes, you will
not see "table.formatted" in the list of defined classes.
 
W

Wally S

Right. But you will not see .formatted in the list of classes unless you
have selected a table. This is the convenience I was trying to point out.

Wally S
 
M

Murray

Yes - I see what you are saying. But if you define the class ".formatted"
rather than teh selector "table.formatted" then you would be able to apply
it anywhere....
 
W

Wally S

True, but there are some formats I only use for tables and some I only use
for divs, and it's nice to have them out of the way when I don't need them,
so I purposely make them selectors.

Wally S
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top