homepage Welcome to WebmasterWorld Guest from 54.226.213.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Newbie problem with first CSS site, please help!
Menu items lose their formating after a you visit a link
karsen




msg:1220242
 2:57 am on Sep 24, 2004 (gmt 0)

I'm a CSS newbie. Last night I finished up my first CSS site. The client wanted a menu bar with mouseover effects so I figured this was a great opportunity to break into CSS feet first (I say feet first because I still relied on tables for layout).

The trouble is the menu items lose their formating after a you visit a link (they turn from white with no underline to black with an underline).

For the life of me I can't figure out what I am doing wrong here. If someone wouldn't mind taking a minute to help I would appreciate it very much.

Theere is a preview version of the site up at: <snip>

The CSS is:

/* For the left navigation bar for the site. */

#navbar_l {
font-family: sans-serif;
color: #ffffff;
font-size: 11px;
text-align: left;
font-weight: bold;
text-decoration: none;
background-color: #006633;
padding-top: 4px;
padding-left: 10px;
padding-bottom: 2px;
}

#navbar_l a:link, #navbar a:visited {
color: #ffffff;
text-decoration: none; }

#navbar_l a.current {
color: #99ccff;
text-decoration: none; }

#navbar_l a:hover {
color: #99ccff;
text-decoration: none;
}

/* For the right navigation bar for the site. */

#navbar_r {
font-family: sans-serif;
color: #ffffff;
font-size: 11px;
text-align: right;
font-weight: bold;
text-decoration: none;
background-color: #006633;
padding-top: 4px;
padding-right: 10px;
padding-bottom: 2px;
}

#navbar_r a:link, #navbar a:visited {
color: #ffffff;
text-decoration: none; }

#navbar_r a.current {
color: #99ccff;
text-decoration: none; }

#navbar_r a:hover {
color: #99ccff;
text-decoration: none; }

/*Contains all levels of text including h elements.*/

body {
margin: 0;
font-family: serif;
color: #000000;
background-color: #ffffff; }

p {
text-align: justify;
line-height: 1.3em; }

h1 {
font-size: 1.4em;
font-weight: bold;
font-style: italic;
text-decoration: none;
margin-bottom: -.5em; }

h2 {font-size: 1.2em;
font-style: italic;
text-decoration: none;
margin-bottom: -.5em; }

h3 {font-size: .9em;
font-style: italic;
text-decoration: none;
margin-bottom: -.5em; }

h4 {font-size: .6em;
text-decoration: none;
font-family: sans-serif;
font-weight: normal;
text-align: right; }

h5{}

h6{}

/*Contains all levels of links.*/

a:link {
color: #000000; }

a:visited {
color: #000000; }

a:hover {
color: #000000; }

a:active {
color: #000000; }

/*This is the footer.*/

#footer {
font-family: sans-serif;
font-size: .7em;
text-align: center;
background-image: url(images/footer_logo.gif);
width: 400px;
background-position: top;
background-repeat: no-repeat;
padding-top: 90px; }

/*This is the footer specific to the contact page only.*/

#contact_footer {
font-family: sans-serif;
font-size: .7em;
text-align: center;
}

/*This area is for the shopping cart buttons on Prague and Feature CD pages.*/

#cd {
font-size: 1em;
text-align: right;
font-family: serif;
font-style: italic;
font-weight: bold;
margin-bottom: +.9em;
margin-right: +10px; }

#ntsc {
font-size: 1em;
text-align: right;
font-family: serif;
font-style: italic;
font-weight: bold;
color: #ff6600;
margin-bottom: +.9em;
margin-right: +10px; }

#pal {
font-size: 1em;
text-align: right;
font-family: serif;
font-style: italic;
font-weight: bold;
margin-bottom: +.9em;
margin-right: +10px;
color: #663399; }

#vhs {
font-size: 1em;
text-align: right;
font-family: serif;
font-style: italic;
font-weight: bold;
color: #339933;
margin-bottom: +.9em;
margin-right: +10px; }

[edited by: SuzyUK at 7:44 am (utc) on Sep. 24, 2004]
[edit reason] URL snip see TOS #13 [webmasterworld.com] [/edit]

 

quesera




msg:1220243
 4:33 am on Sep 24, 2004 (gmt 0)

it's just a typo:

#navbar_l a:link, #navbar a:visited {
color: #ffffff;
text-decoration: none; }

should be:

#navbar_l a:link, #navbar_l a:visited {
color: #ffffff;
text-decoration: none; }

karsen




msg:1220244
 5:45 am on Sep 24, 2004 (gmt 0)

Thanks so much quesera.

I must have read that code through 20 times and never saw it. I need more sleep! :-)

Thanks!

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