Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.UL CSS not working in FF 2

Status
Not open for further replies.

buddyrich2

Technical User
Apr 12, 2006
87
US
I am having problems with links displaying correctly in Firefox. Works correctly in IE and Safari. Here is my CSS code:

ul.mainlink {
padding: 0px;
list-style-type: disc;
margin-top: 10px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 40px;
}
ul.mainlink li {
}

ul.mainlink li a:link ,ul.mainlink li a:visited , ul.mainlink li a:active {
color: #FFFFFF;
display: block;
height: 40px;
width: 100%;
text-decoration: none;
line-height: 40px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 0px;
border-top-style: dashed;
border-right-style: dashed;
border-bottom-style: dashed;
border-left-style: dashed;
border-top-color: #999999;
border-right-color: #999999;
border-bottom-color: #999999;
border-left-color: #999999;
font-weight: bold;
font-size: 14px;
}
ul.mainlink li a:hover{
color: #FFFFFF;
background-color: #333333;
}

Can anyone help me?
 
Sorry.... what is happening is nothing. The text of the links are there but they are formatted in the same style as the (CSS) BODY tag controls. The font, size, position does not change at all. Could it be as simple as those elements not being in the correct order?
 
I would pay special attention to the placement of commas in the selector:
Code:
ul.mainlink li a:link[!] ,[/!]ul.mainlink li a:visited[!] , [/!]ul.mainlink li a:active {
Since in CSS commas, spaces and even punctuation in special places have special meanings, try and change the code to read:
Code:
ul.mainlink li a:link[!], [/!]ul.mainlink li a:visited[!], [/!]ul.mainlink li a:active {
Maybe that will help.

If it doesn't, you need to start debugging. Your style is not being applied because there's an error in your CSS. Start with running it through the validator:


Then check if you really have a ul element with a classname of "mainlink" in your HTML (check the case of the letters, because CSS is case-sensitive). If you still have problems after all this, try and create an online example of your problem and we'll check it out.

[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Can you post a URL? We have no idea what your HTML looks like, or about other CSS that may be interfering.

Also, as it's Fx only, have you tried disabling all plugins and refreshing?

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Here is the link: Working in IE and Safari, not in FF.

Couple of validation errors related to the transparency, but that actually is working in all browsers. I have also attached the stylesheet to this post.

Thanks!
 
The problem is the following in your CSS file:

Code:
div.right_content {
	[!]{[/!]
margin-top: 0em;
background-color: #DFDFDF;
float: right;
width: 231px;
height:100%;

}

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
BTW - the validator does find that error, but only if you paste the URL of the actual page, not the frameset link you gave us.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
Wow! I can't believe I missed that... Billy you are indeed a genious. Thanks so much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top