Closed (fixed)
Project:
SpreadFirefox
Version:
master
Component:
Suggestions
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
22 Jun 2006 at 21:09 UTC
Updated:
8 May 2007 at 07:17 UTC
Guys, can you get the tabs to work in IE, so that we have a TAB DOWN, TAB OVER, etc... So that they work on every browser not just on FireFox.
Comments
Comment #1
phow4rd commentedpiotrdesign:
The problem is that IE/Win (up to version 7.0b2, anyway) only supports the :hover pseudo-class on the "a" element.
Why don't you try editing style.css so that after this line:
...you add another that reads:
I haven't tried it myself, but I suspect that you'd see the proper tab rollover behavior when you rolled over the link text (but not the rest of the tab image).
If that doesn't work, or if you want it to work with the *whole* tab, there are other documented work-arounds for this bug. (For instance this one.)
I don't care about it enough to do the work myself, but maybe you do?
Comment #2
Mad Maks commentedcan you please confirm if this fixed your issue?
Comment #3
piotrdesign commentedYes it did but I want to make them also Stay down tabs once a user clicks on one of them. So im thinking how. Perhaps use fixed tab images on 1 png file and use the bg possitioning just like on this site gtplanet.net so there are no preload problems.
Comment #4
paddy_deburca commentedDrupal adds the active class to a tab when it is pressed.
So, you should add to your CSS the following
I hope this works.
Paddy.
PS: to the best of my knowledge IE _only_ supports :hover on 'a' elements. So normally
li:hovershould not work.Comment #5
piotrdesign commentedI added it above:
#header ul li:hover a {
background-position: 0% -400px;
}
#header ul li:hover {
background-position: 100% -400px;
}
#header ul a:hover {
background-position: 0% -400px;
}
And it didnt work. The tabs dont stay down.
Comment #6
paddy_deburca commentedI have it working on one of my sites - what you need to do is two fold.
Update your page.tpl.php to print the primary_links as follows
Update your CSS to include
Mad Max, if you are watching - is it good pratice to call theme_menu_links from within page.tpl.php?
theme_menu_links adds the active class to the li entries rather than to just the hyper link.
Paddy.
Comment #7
piotrdesign commentedWonderful! Now just 1 more tinny problem to solve. In IE on mouse over I dont see the right part of the tabs highlight. However when the tab is clicked and its a stay down it shows the whole thing! :) Is that hover part fixable?
Comment #8
paddy_deburca commentedI am glad that at least one part of the problem is solved.
IE only supports :hover on hyperlinks. IE does not support :hover on list items.
On hover, the tab is changed by specifying two items in the CSS,
#header ul a:hoverand#header ul li:hover. So only the#header ul li:hover awill work in IE.You could change your CSS to be
IE will then ignore this and will not change the partial background.
Paddy.
Comment #9
melindia commentedWow! works so easily!
thanks a lot...
Just one thing to workaround for me... I have a link pointing to . How to make it active when we're looking at the front page?
Thanks, Mélindia
Comment #10
piotrdesign commentedmake that link point to "node" put that as your URL in your tabs. Also make your home page "node"
Comment #11
piotrdesign commentedOK the stay down doesnt work in Drupal 5.1. see it yourself: www.gtcenter.eu
Comment #12
paddy_deburca commentedAr you using
in your page.tpl.php to produce the links?
Paddy.
Comment #13
piotrdesign commentedI'm currently using this.
[code]
if ($primary_links) :print theme('links', array_reverse($primary_links), array('class' =>'links', 'id' => 'primary'));[/code]
I used what you had and it didnt work. I will try again just in case.
Comment #14
piotrdesign commentedWhen i replace my code with your the website doesnt load, just a blank page.
Comment #15
paddy_deburca commentedThe problem with the new
theme('links', ...)function is that it adds the " active" class only to the <a> element and not theYour menu contains list-items such as menu-1-6-2, menu-1-5-2, menu-1-4-2, menu-1-3-2, menu-1-2-2 and menu-1-1-2.
The drupal-compliant way could be to add
to your CSS.
The paddy-compliant way is to have a theme_menu_links() function that adds " active" to the list-item.
Paddy.
Comment #16
paddy_deburca commentedPlease read the first line as:
The problem with the new theme('links', ...) function is that it adds the " active" class only to the <a> element and not the
<li> element. It is therefore not possible to 'easily' theme the menu.
I forgot to escape the brackets around the li element.
Paddy.
Comment #17
piotrdesign commentedThanks alot, now the tabs are working on my site. :)
Comment #18
paddy_deburca commentedYou are welcome.
I am marking this issue as fixed.
Paddy.
Comment #19
(not verified) commented