A little CSS help please?

B

Big Bill

I can't get this to work;

P.p13
{text-align: center;}
{text-decoration: underline;}
{font-family: verdana, Arial, Helvetica, Sans-Serif;}
{font-size: large;}
{font-style: normal;}
{font-weight: bold;}

First off the text is smaller than if I just put "font-size: normal"
or "font-size: medium" and I can have the text either centred or
underlined, I can't get it to be both centred and underlined. I just
can't see what I'm doing wrong!

BB
 
D

Derek Clarkson

Hi Bill, You don't put each setting in separate brackets. By doing so, only
the center setting is being associated with the P.p13. You use brackets to
associate any number of settings with a single selector. Here is how it
should have been, just cut and paste this:

P.p13 {
text-align: center;
text-decoration: underline;
font-family: verdana, Arial, Helvetica, Sans-Serif;
font-size: large;
font-style: normal;
font-weight: bold;
}

Note: You can put the brackets on the same line as the first and last
setting. I just like to put them on separate lines.

cio
Derek
 
R

rf

Big Bill said:
I can't get this to work;

P.p13
{text-align: center;}
{text-decoration: underline;}
{font-family: verdana, Arial, Helvetica, Sans-Serif;}
{font-size: large;}
{font-style: normal;}
{font-weight: bold;}

First off the text is smaller than if I just put "font-size: normal"
or "font-size: medium" and I can have the text either centred or
underlined, I can't get it to be both centred and underlined. I just
can't see what I'm doing wrong!

Hmmm.

P.p13
{
text-align: center;
text-decoration: underline;
font-family: verdana, Arial, Helvetica, Sans-Serif;
font-size: large;
font-style: normal;
font-weight: bold;
}

Cheers
Richard.
 
B

Big Bill

Hmmm.

P.p13
{
text-align: center;
text-decoration: underline;
font-family: verdana, Arial, Helvetica, Sans-Serif;
font-size: large;
font-style: normal;
font-weight: bold;
}

Cheers
Richard.

Thanks Richard.

BB
 
B

Big Bill

Hi Bill, You don't put each setting in separate brackets. By doing so, only
the center setting is being associated with the P.p13. You use brackets to
associate any number of settings with a single selector. Here is how it
should have been, just cut and paste this:

P.p13 {
text-align: center;
text-decoration: underline;
font-family: verdana, Arial, Helvetica, Sans-Serif;
font-size: large;
font-style: normal;
font-weight: bold;
}

Note: You can put the brackets on the same line as the first and last
setting. I just like to put them on separate lines.

cio
Derek

Gotcha! Ta!

BB
 

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

Members online

No members online now.

Forum statistics

Threads
474,091
Messages
2,570,605
Members
47,225
Latest member
DarrinWhit

Latest Threads

Top