<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043752" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043752</link>
    <description></description>
    <language>en</language>
          <item>
    <title>greg wrote:
or do I call</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241073</link>
    <description> &lt;p&gt;&lt;div class=&quot;quote-msg&quot;&gt;&lt;div class=&quot;quote-author&quot;&gt;&lt;em&gt;greg&lt;/em&gt; wrote:&lt;/div&gt;or do I call id=&quot;home&quot; class=&quot;current&quot; in the same element?&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Yes, you can try that (I&#039;m not 100% sure if #home.current will work in all browsers...). The second part of my solution there was to put the identifiers on different elements (the ID on the li and the class on the a) which gets around that problem.&lt;/p&gt;
&lt;p&gt;Why do you think you need to change them to classes? If they are unique elements that don&#039;t appear elsewhere on the page they &lt;em&gt;should&lt;/em&gt; be id&#039;s.&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 16:19:07 +0000</pubDate>
 <dc:creator>Megan</dc:creator>
 <guid isPermaLink="false">comment 1241073 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I do usually put the text in</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241071</link>
    <description> &lt;p&gt;I do usually put the text in with HTML, but on this occasion because of the way I designed the navigation images I had to do it this way, well, &quot;wanted&quot; to is a better word. &lt;/p&gt;
&lt;p&gt;I&#039;ll have a go at your suggestions, although I presume I need to change both to classes.&lt;br /&gt;
.home to #home&lt;br /&gt;
and&lt;br /&gt;
.current to #current&lt;br /&gt;
or do I call id=&quot;home&quot; class=&quot;current&quot; in the same element?&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 15:36:11 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1241071 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>So, basically what you&#039;re</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241065</link>
    <description> &lt;p&gt;So, basically what you&#039;re trying to do is apply two classes to an element and target them both in CSS, is that right? Why don&#039;t you use id&#039;s for the link titles? That would make it easier to do this. So instead of a home class it would be a home id (I&#039;m assuming there is only one instance of this navbar on the page). In that case something like this would work:&lt;/p&gt;
&lt;p&gt;#home.current (no space here)&lt;/p&gt;
&lt;p&gt;I *think* this works - possibly not in older browsers though. Will have to check.&lt;/p&gt;
&lt;p&gt;Or you could put the ID on the li and the .current on the a, so you&#039;d have this&lt;/p&gt;
&lt;p&gt;li#home a.current&lt;/p&gt;
&lt;p&gt;or more simply&lt;/p&gt;
&lt;p&gt;#home .current (notice the space)&lt;/p&gt;
&lt;p&gt;Why is the text in the image anyway? Is it using a special font? Much easier to keep the text in HTML if possible (and better for accessibility, search engines etc.). Or are you doing an image replacement technique?&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 15:06:35 +0000</pubDate>
 <dc:creator>Megan</dc:creator>
 <guid isPermaLink="false">comment 1241065 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>did you notice the active</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241063</link>
    <description> &lt;p&gt;did you notice the active class &lt;code&gt;a.active&lt;/code&gt; in the code sample?&lt;/p&gt;
&lt;p&gt;you know the drill, a link or some more complete code will help!&lt;/p&gt;
&lt;p&gt;I still think you should apply the pseudoclasses to the a tag and not to li....&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 14:59:57 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1241063 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks, but :active isn&#039;t</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241061</link>
    <description> &lt;p&gt;Thanks, but :active isn&#039;t really what I need.&lt;/p&gt;
&lt;p&gt;I have two images for each page (&quot;Home&quot; &quot;about&quot; &quot;contact&quot; etc).&lt;br /&gt;
Per page I have one image for &quot;not active&quot; and &quot;not current&quot; and another image for &quot;active&quot; and &quot;current&quot;.&lt;br /&gt;
Setting the image for non-active and non-current is fine, as is setting the other &quot;active&quot; image for :active, but I cannot tie the &quot;current&quot; to each image.&lt;/p&gt;
&lt;p&gt;So when the user is on homepage, the CSS needs to know to use &quot;home_active.png&quot;. for that I need it to know class=&quot;home current&quot;. As said, in the html that is done (with PHP), but I cannot get the CSS to tie &quot;.home&quot; class with &quot;.current&quot; class so when the HTL states &quot;class=&#039;home current&#039;&quot; it will display the current image rather than the non-current and non-active one.&lt;/p&gt;
&lt;p&gt;(As it happens, I use the active image for the current one too)&lt;/p&gt;
&lt;p&gt;It has been driving me round the bend for hours now.&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 14:37:15 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1241061 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I usually apply the hover</title>
    <link>https://www.webmaster-forums.net/html-css-and-javascript/css-current-class#comment-1241058</link>
    <description> &lt;p&gt;I usually apply the hover and active pseudoclasses to the a element, without classes:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#main_nav li a:hover, #main_nav li a:active&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;should work with the class added:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;#main_nav li a.home:hover, #main_nav li a.home:active&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;from &lt;a href=&quot;http://www.w3schools.com/css/pr_pseudo_active.asp&quot;&gt;W3Schools&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective!!&lt;/p&gt;
&lt;p&gt;Note: a:active MUST come after a:hover in the CSS definition in order to be effective!!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;the menu for this (Drupal!) &lt;a href=&quot;http://meier.decibelplaces.com/node&quot;&gt;site&lt;/a&gt; using &lt;em&gt;a.active&lt;/em&gt;:&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;li#menu-479 a {background: url(&amp;#039;/sites/default/files/theme/meier_btn_01_a.gif&amp;#039;)}&lt;br /&gt;li#menu-479 a.active, li#menu-479&amp;nbsp; a:hover {background: url(&amp;#039;/sites/default/files/theme/meier_btn_01_b.gif&amp;#039;)}&lt;br /&gt;&lt;br /&gt;li#menu-739 a { background: url(&amp;#039;/sites/default/files/theme/meier_btn_02_a.gif&amp;#039;)}&lt;br /&gt;li#menu-739 a.active, li#menu-739&amp;nbsp; a:hover {background: url(&amp;#039;/sites/default/files/theme/meier_btn_02_b.gif&amp;#039;)}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;li#menu-481 a {background: url(&amp;#039;/sites/default/files/theme/meier_btn_03_a.gif&amp;#039;);}&lt;br /&gt;li#menu-481 a.active, li#menu-481 a:hover {background: url(&amp;#039;/sites/default/files/theme/meier_btn_03_b.gif&amp;#039;);}&lt;br /&gt;&lt;br /&gt;li#menu-482 a {background: url(&amp;#039;/sites/default/files/theme/meier_btn_04_a.gif&amp;#039;);}&lt;br /&gt;li#menu-482 a.active, li#menu-482&amp;nbsp; a:hover {background: url(&amp;#039;/sites/default/files/theme/meier_btn_04_b.gif&amp;#039;);}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;you may need to add padding to the a elements to display the bg image properly&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;ul.nice-menu li#menu-479 a {&lt;br /&gt;padding: 14px 9px 25px 9px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ul.nice-menu li#menu-739 a{&lt;br /&gt;margin-left: 4px;&lt;br /&gt;padding: 14px 17px 25px 24px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ul.nice-menu li#menu-481 a {&lt;br /&gt;margin-left: 4px;&lt;br /&gt;padding: 14px 17px 25px 24px;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ul.nice-menu li#menu-482 a {&lt;br /&gt;margin-left: 4px;&lt;br /&gt;padding: 14px 43px 25px 8px;&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 29 Apr 2009 13:32:22 +0000</pubDate>
 <dc:creator>decibel.places</dc:creator>
 <guid isPermaLink="false">comment 1241058 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
