homepage Welcome to WebmasterWorld Guest from 23.21.9.44
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
simple span/class problem
wellgahlee




msg:3376198
 8:45 pm on Jun 22, 2007 (gmt 0)

I must be overlooking something really obvious, but I can't get the span tag to change the text within my <p> tags.

css:
.date {
font: 11px/16px times,georgia,times-new-roman,serif;
font-weight:bold;
color: #000000;
}

html:

<p>

<span class="date">Wednesday, July 4, 2007</span><br>
Presentation/Book Signing <br>
Thomas E. Crew....

I'm sure this is a hiearchy of the css elements problem, but I can't figure out how to fix it. thanks

 

londrum




msg:3376234
 9:26 pm on Jun 22, 2007 (gmt 0)

what's your css on the <p> tag?, and in which order do they come in the css.
it should work as far as i can see, but i'm wondering what it's changing from.
i don't think times-new-roman will do anything though. it needs to be inside quotes. you could rewrite the whole thing like this:

.date {
font: bold 11px/16px times,georgia,"times new roman",serif;
color: #000;
}

Xapti




msg:3376336
 12:24 am on Jun 23, 2007 (gmt 0)

I don't use font short hands too much, so I really don't know too well (I do know it's a BIT tricky though)... but is that a proper short hand version of the font attribute?

perhaps just TRY font-family:blah; font-size:blah; line-height:blah.
Or is NONE of the style info working? which attribute are working, and which are not?

Also if you know what CSS specificity is (if you don't, you can read up), you can make sure that it's not causing any problems from the rest of your code.

[edited by: Xapti at 12:27 am (utc) on June 23, 2007]

coho75




msg:3376379
 2:28 am on Jun 23, 2007 (gmt 0)

Try -

.date {
font: bold 11px/16px times, georgia , "times new roman", serif;
color:bold;
}

Any font that has spaces in the name must have quotes around it. Also, if you don't have the fonts specified installed on your machine, you won't see them.

coho75




msg:3376654
 11:38 am on Jun 23, 2007 (gmt 0)

Err - should be color:#000;

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved