Saint_Michael
Feb 19 2006, 03:50 PM
Ok I been searching for days now on a half way descent tutorial on how to do a Image Roll Over Drop Down Menu in CSS without the use of javascript, I been seeing alot of the suckerfish set up but of course no one goes in to detail on how to set up the image rollover version of it. Plus I don't want the dhtml or the javascript setup just good ole pure css. Also I need ot be able to control multiple menus in one script as well. CODE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis" /> <style type="text/css"> ul, li { margin:0; padding:0; list-style-type:none; } a { text-decoration:none; } ul { width:40px; } ul h2, li { height:32px; margin:0; padding:0; } ul h2 img { display:block; } ul h2 { background-image:url(images/template43_04.gif); } ul li:hover h2 img, ul li.sfhover h2 img { display:none; } ul li ul { display:none; } ul li:hover ul, ul li.sfhover ul { display:block; } ul li ul li:hover, ul li ul li.sfhover { background-color:#FF0000; }
ul1, li { margin:0; padding:0; list-style-type:none; } a { text-decoration:none; } ul1 { width:40px; } ul1 h2, li { height:32px; margin:0; padding:0; } ul1 h2 img { display:block; } ul1 h2 { background-image:url(images/template43_05.gif); } ul1 li:hover h2 img, ul li.sfhover h2 img { display:none; } ul1 li ul { display:none; } ul1 li:hover ul, ul li.sfhover ul { display:block; } ul1 li ul li:hover, ul li ul li.sfhover { background-color:#FF0000; } </style> <script type="text/javascript"> //suckerfish//
sfHover = function() { var sfEls = document.body.getElementsByTagName("LI"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" sfhover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" sfhover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover);
</script> </head> <body> <ul id="nav"> <li><h2><img src="images/template41_04.gif" width="40" height="32" alt="" /></h2>
<ul> <li><a href="#">Red</a></li> <li><a href="#">White</a></li> <li><a href="#">Pink</a></li> </ul> </li>
</ul> </body> </html>
Reply
Tyssen
Feb 19 2006, 10:32 PM
QUOTE(Saint_Michael @ Feb 20 2006, 01:50 AM)  What's ul1? It's not a valid tag. You're quite right about there being a lack of tutorials on how to combine image replacement rollovers with Suckerfish Dropdowns. I've been thinking or writing an article about it myself one day but haven't gotten around to it yet. Best I can do is point you towards an example I've done: http://www.volllaw.com.au/
Reply
leiaah
Feb 21 2006, 01:45 PM
If you're using Macromedia Dreamweaver the code gets generated automatically after choosing your settings for the rollovers. I just thought maybe you can just make use of it if you wanted an easier way and you already have the program installed. It's in the behaviors panel. It's in JavaScript and I understand you want it done in CSS but again if you have it, it's easier. Cheers
Reply
Recent Queries:--
how to set images as background for drop down box in html - 4.44 hr back. (1)
-
rolldown menu - 4.63 hr back. (1)
-
drop down with images - 4.87 hr back. (3)
-
drop-down menu internet explorer css disable load image - 9.34 hr back. (1)
-
add roll over drop down menu html - 11.45 hr back. (1)
-
menu roll over not working in internet explorer - 12.04 hr back. (1)
-
dropdown menu on mouse rollover - 17.36 hr back. (2)
-
drop down menu from an image - 21.37 hr back. (1)
-
rollover dropdowns menu html - 22.13 hr back. (1)
-
css drop down menu large roll over - 22.97 hr back. (1)
-
drop down rollover menu - 21.70 hr back. (2)
-
drop down over advertisement html - 26.07 hr back. (1)
-
roll down picture menu - 28.88 hr back. (1)
-
rollover drop down menu with images codes - 34.45 hr back. (1)
Similar Topics
Keywords : image, roll, drop, menu
- Iframe Menu Question
(1)
Menu Errors In Internet Explorer
(4) I am not sure if this is the correct section, but this is related to HTML. I have some menus at the
top of my forum, which work perfectly in Firefox. But my members started complaining that they were
not working correctly, and when I tested it in Internet Explorer, I found that only two of the menus
show up, and the others show up as plain text below. Here is a screenshot of what the menus look
like in the two browsers: I have thought of something though. The HTML i used for my menus was
the only code I could find for to make some menus. But I noticed that this forum....
Help With Background Image
please? :) (6) Ok heres the scoop, i got a background that i made in paint for my website its just like 3 lines for
the nav bar, banner and other things ect. ect. now when i hosted it on a site and put in the This
is what it looks like in paint http://img.photobucket.com/albums/v614/Dj1.../background.jpg and
this is what it looks like when i put it into HTML
http://img.photobucket.com/albums/v614/Dj169211/Damn.jpg i dont want it tiled like that so is
there any way that i can change that? any ideas? :| Thanks in advance /smile.gif"
style="vertical-align:middle" emoid=":)" borde....
Help With Nav Menu Error
(5) my webpage http://switchfoot.ifastnet.com/index.php has something wrong with it, as soon as you
load the page the menu appears on the right then goes to it's spot on the left, any help? As
Soon As Poosible would be nice but there is no rush really.... (only hosting it there for now, when
i finish the website it will be moved to trap) Title needs to be more discriptive then just
help, so as to get a better answer from the members. ....
Background Image Picture On A Website
how do u make a pic a backround?? (3) ?email me if u know! Trap17 forum asks you to post contributes with substance. ....
Image Links
(5) Ok...another question...may sound stupid, but we're all stupid...how'd I be able to create
an image link. Uh...let me rephrase this: If I were to create an "Enter" image and wanted people to
click the image to enter to a certain page, how would I do it without some sort of the famous "Blue
Line" around it? Any help would be greatly appreciated... /unsure.gif"
style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" />....
Typing Over Image
(7) Is it possible to have a linked font over an image (not being a background image)? If so, how do I
accomplish that?....
Menu Bar Aligning
(1) I am creating a website for an outreach service. I am running into a reoccuring problem. I can get
everything to center correctly while I am viewing it under 1024x768. When I view it under 800x600
the menu itself pulls to the right. If I take away the absolute value it puts the menu on the left
margin. You can view the source by going to this website: http://www.faithcity.org/test.html . Any
advice would be greatly appreciated.....
Need Help With Image Wrapping
(13) ok my problem now is that i need it to auto width the image that needs to be use so then I can use
tags for the content without the need for the image to expand from left to right. heres the css for
the image wrap CODE <style type="text/css"> span { background-image:
url(images/gfxtrap_42.gif); background-repeat: repeat-y;
background-position: top left, bottom right; height: 200px; border: 0px; }
</style> heres the rest of the website code. CODE <!DOCTYPE html PUBLIC
"....
Getting An Image To Scroll On With Content
(13) ok, well i had had people review Hogwartsmagic.net and they said that i should get it to not be one
huge image as a layout..and i have figured most of it out and it has proven sucessful! but now i
am having diffuclty, i am pretty much only a basicl HTML kinda person... and i was wondering if
anyone knows an html code that will allow one image to scroll the entire length of a pages content?
for example, if i were to add 200 links to the right navigation..the image would go with the
content.. i am testing it out here HERE any help would be much appreciated....
Ie5 Mac Does Not See My Site
It shows the body bg image only... (11) Remember that site layout I was hacking down for IE? Which by the way I didnt really like, but it
was the customer's design... and yes, he is not a graphic designer hehe... Anyway I was really
surprised that I got to the solution and fixed it... but as I'm testing between browsers, I come
to see that Internet Explorer in Mac does not show nothing of my page, yet the source code is there,
if you click command + e in order to see the html source code, its all there! But all I can see
from the page itself is the body background-image... I tried removing the d....
Usemap And Table Background Image Changing
(5) I have a menu page that consists of links to other pages. The page has a background image of a
globe. The globe is divided into seperate sections for each menu item. As a user hovers over each
section I change the background image(The same globe with that section highlighted.) That is what I
have so far except that they have to hover over a small anchor tag that I put in not the whole
section. I want to change it so that they can actually hover over all of the section they are
selecting. I found usemap online but haven't found any examples where it will actually ch....
Image Doesn't Load
(6) Hi, Never hapened to me since HTML was invented. I've got a webpage ( h.shtml - I've also
tryed .htm, .html ) with the following code: Code: CODE <html> <head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta
name="ProgId" content="FrontPage.Editor.Document"> <meta
http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Horoscope</title> </head> <body> <div
align="center"> <cente....
Fixed Background Image
Just little reminder (10) Easy teahnic, post the following codes between and QUOTE <!--
body{background-image: url( under.gif ); background-repeat:no-repeat; background-attachment :
fixed; background-position: 10% 20% ;} --> For red colour, change it to your
image's location. For green colour, it is used to set horizontal and vertical position of
background image. I hope it can help you. /tongue.gif' border='0' style='vertical-align:middle'
alt='tongue.gif' /> ....
Image.index.html
(10) hello there well i designed this image that includes text a logo i shall say i am aware that i need
to title it index.html when i upload the file i visit my website and it shows the file folder. now i
only want that image i designed on there so when clients visit my site it only goes to that page the
rest of my site isent done yet. i want it to be just like the sites you visit and it states
underconstruction. programs ive tried: indesign, image ready, incopy cs2, dreamweaver. and i
still dont understand please help meeh thanks oh and what classify's images html,....
Dhtml Menu That Reads A Database
(7) I wanted to make a DHTML menu that read off a database, so it woud work with a menu system in
PHP-nuke, called somarre patreballe, or something like that. Anybody can help me? I don't know
much of anything about DHTML.....
Substitute Form Button For An Image
homemade images in forms buttons (3) Hi, I have the next formular : CODE <form method='post'
action='index.php?mode=2&id=1'> <input type='hidden'
name='name' value='Canon Digital Ixus 700'/> <input
type='hidden' name='id' value='1'/> <input
type='hidden' name='qty' value='1'> <input
type='hidden' name='cost' value='40'> <input
type='submit' value='Add to ca....
Simple Smil Question About Image Positioning
(3) Howdy all, I'm working on a project for college but ran into a "little" problem with SMIL,
concerning positioning images. You can see the smil presentation here:
http://www.ket.trap17.com/smil-show/index.html (its only a 15 second presentation and doesn't
take long to load. don't mind the language on the left image, its portuguese) What i want to
do, is to make the image on the right, to fade in in the same place as the left image. I tried
setting a region but that didn't work, I tried using the layout tags in the but that also
didn't work (o....
Drop Down Menu
(1) This little code will disable the select option in a drop down menu, sometimes people like to add
titles to their menu. insted of Pick One Choise 1 try Choise 1 with
optgroup users can't select Pick One, it is just use as a title....
Looking for image, roll, drop, menu
|
|
Searching Video's for image, roll, drop, menu
|
advertisement
|
|