|
| |
|
|
Bruce2000
Posts: 147 From: Huntsville AL USA Status: offline
|
Different Font Styles on the Same Page - 1/14/2007 14:42:46
Lets say I have some text in one cell that is going to be over a dark background so I'd like to make the font color white....but in another cell, I have a white background so I'd like to make the font a darker color. These colors will be the same on all pages so I'd like to use css. Is it better to create a seperate stylesheet for the white cell and the dark cell? Or can I specify in one stylesheet which cell to make white font? I made a stylesheet for my page but it changes the font for the entire page. CSS seems a bit confusing. Bruce
|
|
|
|
Bruce2000
Posts: 147 From: Huntsville AL USA Status: offline
|
RE: Different Font Styles on the Same Page - 1/15/2007 3:51:09
Ok, here is what I am talking about. On my website pages: My site You see in my header bar, the navigation links. But that background is different than the body (white) so I can use a white font here but not in the body. What I did was make a class identification for those links which are to be white and I placed before each of the links in the header bar like this: <a class="header" href="..... > Then in my style sheet I made this entry: a.header:link {font-size: 12; font-weight: bold; color: #FFFAFA;} Is that the correct way of doing it? Would I just create a new entry for visited and active like this: a.header:visited? Also: you see the black vertical seperators between the links. In my site's online version I made each link fit neatly between the seperators by use of spaces. This can be done in css, right? I can remove all the extra spaces but I can't figure out how to increase the space between each word so they will fit into their spaces. Those seperators are not a font - they were built into the grey bar background. I should also mention that the links were placed in those spots simply with a <p> tag and margin & indent for the first word, "work", from its home position, in the top left corner of the cell. (the picture portion of my header is a cell) and the words that come after "work" are simply aligned with spaces. The only way I can think of doing it is by making some CSS commands for margin and indent, but then I would have to give each link word its own ID and each one wouldbe at a different indent value. This would mean that for each ID, I'd also have to copy all the CSS font tags. Unless I maybe create a <div> around all those links and apply the font declarations to all those links at once. I'm not sure if this is the right way to do this.
< Message edited by Bruce2000 -- 1/15/2007 4:30:38 >
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|