iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-2007, 08:57 AM
WebProWorld Member
 
Join Date: Jan 2006
Location: Ireland
Posts: 52
jasonweb RepRank 0
Default CSS Classes not showing in Firefox

I needed to change over for divs that were working but were not valid to classes that are showing correctly in Internet Explorer but not Firefox.

1) The first class shows up correctly in both browsers. Here are the two classes;

p.first{
font-family:Arial, Helvetica, sans-serif;
font-size:0.6em;
color:#FFFF33;
font-weight:lighter;}
}

p.second{
font-family:Arial, Helvetica, sans-serif;
font-size:0.6em;
color:#0AB67D;
font-weight:lighter;}
}

They are both the same expect for a colour change so perhaps theres a mistake in the HTML file but thats validating.

2) How do I how the smaller coloured text directly below the link like I had it when I was using DIV's instead? Will I have to make up loads of new DIV's?

3) The stars that should be in front of the links using LI are not showing at all using Internet Explore, can this be resolved?


TankCetra - Who are we
http://www.tankcetra.com/temp/style.css
Reply With Quote
  #2 (permalink)  
Old 06-27-2007, 10:22 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default Re: CSS Classes not showing in Firefox

1) You've got an an extra } after each class. Firefox doesn't like bad code much.

2) Sorry, not sure what you mean. It looks like it's in a p tag therefore you can style that.

3) Does fixing 1 fix this by any chance?
Reply With Quote
  #3 (permalink)  
Old 06-27-2007, 10:24 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default Re: CSS Classes not showing in Firefox

3) Looks like you need to add some left margin/padding to the list as it seems to go under the main body.
Reply With Quote
  #4 (permalink)  
Old 06-27-2007, 11:13 AM
WebProWorld Member
 
Join Date: Jan 2006
Location: Ireland
Posts: 52
jasonweb RepRank 0
Default Re: CSS Classes not showing in Firefox

Thanks a million speed I never even thought that the stars might be hidden under another layer I thought I'd already resolve that earlier.

Do you know anyway to have the smaller text directly underneath the links? For example;

(Suppliers of Life Support Equipment) directly under Aqua Medic without any space?
Reply With Quote
  #5 (permalink)  
Old 06-27-2007, 11:26 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default Re: CSS Classes not showing in Firefox

Play with the top and bottom margins on the p tags that contain that text. Setting the top margin to 0 should move the text hard against the link.
Reply With Quote
  #6 (permalink)  
Old 06-27-2007, 08:06 PM
WebProWorld Pro
 
Join Date: Aug 2003
Location: California,USA
Posts: 294
drummin RepRank 0
Default Re: CSS Classes not showing in Firefox

This brings up a question...
Seems that labeling the name as "p.first" doesn't define the <p> within the class of "first".
If you had a <div class="first"><p>Bunch of text.</p></div>, the <p> is still general. You'd need to add the class to any <p>'s as in <p class="first">Bunch of text.</p>

Shouldn't it be labeled as ".first p{whatever} so all <p>'s within the class of "first" would be defined???
Does this make sense?
Reply With Quote
  #7 (permalink)  
Old 06-28-2007, 05:11 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default Re: CSS Classes not showing in Firefox

If the CSS is p.first then the HTML is <p class="first"></p>, that is .first is a class of tag <p>

If the CSS is .first p then the HTML is <div class="first"><p></p></div>, that is <p> within a container with class .first applied to it takes this style.

The 2nd applies to all <p> within the container with class first applied, while the 1st allows you to select individual <p> to apply the class to.

Which is right depends on the page structure and the effect you are trying to achieve.

You can get really creative by adding more levels, e.g. #menu li ul .first
Reply With Quote
  #8 (permalink)  
Old 06-28-2007, 11:36 AM
WebProWorld Pro
 
Join Date: Aug 2003
Location: California,USA
Posts: 294
drummin RepRank 0
Default Re: CSS Classes not showing in Firefox

As I thought.
Thanks Speed for the clarification!

It seemed to me that jasonweb was not going to get the results he was hoping for with the css naming he was using. He'd have to "class" each <p> instead of styling an area such as main content. This is why I brought it up. I wasn't sure that the css naming he was using would apply as expected.
Reply With Quote
  #9 (permalink)  
Old 06-28-2007, 11:51 AM
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Cornwall, UK
Posts: 972
speed RepRank 1
Default Re: CSS Classes not showing in Firefox

He's after alternating the small text colour, so yes giving all <p> tags a class will do that. However it could be simplified by using a default style for <p> within the area, then only giving the class to alternate rows, therefore:

<div id="Links">
<ul>
<li><a></a><p class="second"></p></li>
<li><a></a><p class="first"></p></li>
</ul>
</div>

Would become:

<div id="Links">
<ul>
<li><a></a><p></p></li>
<li><a></a><p class="alt"></p></li>
</ul>
</div>

Then the style that was .second would become the following and the default style for <p>:

#Links p { }

The style that was .first would become the following, as it would inherit all of the above <p> style one would only need to set the colour colour:

#Links p.alt {}

I think the wrapper div can be removed and the id="Links" applied to <ul> directly, however that may break IE6 so would need testing.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
G. isn't showing my site locally, but is showing it globally writergrrrl48 Google Discussion Forum 11 05-17-2006 08:57 PM
Iframe showing white in IE but not firefox baritoneuk Graphics & Design Discussion Forum 3 01-06-2006 07:53 PM
Are there classes? FloridaBroker Search Engine Optimization Forum 4 09-30-2005 09:59 AM
OSCommerce Tutorials or Classes Mac 5 eCommerce Discussion Forum 2 07-15-2004 10:16 PM
Hello from Training-Classes.com training Introductions 1 05-19-2004 04:15 AM


All times are GMT -4. The time now is 04:39 PM.



Search Engine Optimization by vBSEO 3.3.0