/    Sign up×
Community /Pin to ProfileBookmark

hover over link

hey. i was wondering if you could help me.

I’ve been creating my site for a while now and I can not get to grasp with this one task.

basically i want to use the hover over style that is used on this “[B]semi_opaque_menu[/B]” ([I][url]http://www.dynamicdrive.com/style/csslibrary/item/css3_semi_opaque_menu/[/url][/I]) with this “[B]Switch Menu[/B]” ([I][url]http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm[/url][/I]). I’m trying to get the sub links for example:
[I]-What’s New
– What’s hot
– Revised Scripts
– More Zone[/I]

to box when they get hovered over.

please help as I have been trying for a while. is there any code that I can use that can do that? thanks.

to post a comment
CSS

15 Comments(s)

Copy linkTweet thisAlerts:
@BlackedOut271Feb 05.2012 — I'm taking a look right now...
Copy linkTweet thisAlerts:
@BlackedOut271Feb 05.2012 — Link to your site? Think I have a solution...
Copy linkTweet thisAlerts:
@kevstarliveauthorFeb 05.2012 — its not up and running yet. i want to get the site 100% perfect before I publish it. any codes for me to try?
Copy linkTweet thisAlerts:
@BlackedOut271Feb 05.2012 — I'm building a menu right now for you, just kinda need to know general parameters like width / height, colors it should be etc. so I can put it all together. There's not necessarily a generic code to layout for you without knowing what we want it to look like ya know?
Copy linkTweet thisAlerts:
@kevstarliveauthorFeb 05.2012 — ok pal:

here is the code that I'm using on my site on the menu page.

[I][COLOR="Sienna"]<!DOCTYPE html>



<html lang="en">

<head>

<meta charset="utf-8" />

<title></title>

</head>

<body>





<style><!--a:hover{color:none; style:Block: text-decoration:Block; background-color:none; }--></style>



<body bgcolor="#b1e958">



<html>



<head>

<br> <br>

<td><!-- menu -->



<style type="text/css">

.menutitle{

cursor:pointer;

margin-bottom: 5px;

background-color:#b1e958;

color:#000000;

width:140px;

padding:2px;

text-align:center;

font-weight:bold;

/*/*/border:1px solid #000000;/* */

}



.submenu{

margin-bottom: 1.0em;

}

</style>



<script type="text/javascript">



/***********************************************

*
Switch Menu script- by Martial B of http://getElementById.com/

* Modified by Dynamic Drive for format & NS4/IE4 compatibility

*
Visit http://www.dynamicdrive.com/ for full source code

**
*********************************************/



if (document.getElementById){ //DynamicDrive.com change

document.write('<style type="text/css">n')

document.write('.submenu{display: none;}n')

document.write('</style>n')

}



function SwitchMenu(obj){

if(document.getElementById){

var el = document.getElementById(obj);

var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change

if(el.style.display != "block"){ //DynamicDrive.com change

for (var i=0; i<ar.length; i++){

if (ar[i].className=="submenu") //DynamicDrive.com change

ar[i].style.display = "none";

}

el.style.display = "block";

}else{

el.style.display = "block";

}

}

}



</script>

</head>



<body>





<!-- Keep all menus within masterdiv-->

<div id="masterdiv">

<FONT FACE="modern">

<div class="menutitle" onclick="SwitchMenu('sub1')"> <FONT COLOR="#000000">Free / Almost Free</FONT></div>

<span class="submenu" id="sub1">

- <A HREF="testing/freebies.php"title="Freebies"target=Main><FONT COLOR="#000000">Freebies</A><br>



  • - <A HREF="Free_Trial.cshtml"title="Free Trial"target=Main><FONT COLOR="#000000">Free Trial</A><br>


  • - <A HREF="Surveys.cshtml"title="Surveys"target=Main><FONT COLOR="#000000">Surveys</A><br>


  • - <A HREF="Competitions.cshtml"title="Competitions"target=Main><FONT COLOR="#000000">Competitions</A><br>


  • - <A HREF="min_pay.cshtml"title="Little Payment Required"target=Main><FONT COLOR="#000000">Little Payment</A><br>


  • </span>

    <div class="menutitle" onclick="SwitchMenu('sub2')"> <FONT COLOR="#000000">Shopping</FONT></div>

    <span class="submenu" id="sub2">

  • - <A HREF="Highstreet.cshtml"title="High Street Stores"target=Main><FONT COLOR="#000000">High Street</A><br>


  • - <A HREF="Online.cshtml"title="Online Stores"target=Main><FONT COLOR="#000000">Online Only</A><br>


  • - <A HREF="credit.cshtml"title="Credit Cards"target=Main><FONT COLOR="#000000">Credit Cards</A><br>



  • </span>

    <div class="menutitle" onclick="SwitchMenu('sub3')"> <FONT COLOR="#000000">Travel</FONT></div>

    <span class="submenu" id="sub3">

    - <A HREF="motor.cshtml"style="text-decoration: none;"title="Buy, Test Drive A New Motor"target=Main><FONT COLOR="#000000">Motor</A><br>

  • - <A HREF="Travel.cshtml"style="text-decoration: none;"title="Travel Agents"target=Main><FONT COLOR="#000000">Travel Agents</A><br>


  • - <A HREF="flights.cshtml"style="text-decoration: none;"title="Flights"target=Main><FONT COLOR="#000000">Flights</A><br>


  • - <A HREF="Days_out.cshtml"style="text-decoration: none;title="Days Out"target=Main><FONT COLOR="#000000">Days Out</A><br>

    </span>


  • <div class="menutitle" onclick="SwitchMenu('sub4')"> <FONT COLOR="#000000">Insurance</FONT></div>

    <span class="submenu" id="sub4">

  • - <A HREF="insure_home.cshtml"title="Home Insurance"target=Main><FONT COLOR="#000000">Home</A><br>


  • - <A HREF="insure_car.cshtml"title="Car Insurance"target=Main><FONT COLOR="#000000">Car</A><br>


  • - <A HREF="insure_travel.cshtml"title="Travel Insurance"target=Main><FONT COLOR="#000000">Travel</A><br>


  • - <A HREF="insure_pet.cshtml"title="Pet Insurance"target=Main><FONT COLOR="#000000">Pet</A><br>



  • </span>

    <div class="menutitle" onclick="SwitchMenu('sub5')"> <FONT COLOR="#000000">Catagorys</FONT></div>

    <span class="submenu" id="sub5">

  • - <A HREF="electrical.cshtml"title="Electrical Goods"target=Main><FONT COLOR="#000000">Electrical</A><br>


  • - <A HREF="DVD.cshtml"title="DVD's, Bluerays, Books, Console Games"target=Main><FONT COLOR="#000000">Entertainment</A><br>


  • - <A HREF="clothing.cshtml"title="Fashoin Clothing"target=Main><FONT COLOR="#000000">Fashion</A><br>


  • - <A HREF="music.cshtml"title="Mp3's & CD's"target=Main><FONT COLOR="#000000">Music</A><br>


  • - <A HREF="gamble.cshtml"title="Bingo, Poker and more"target=Main><FONT COLOR="#000000">Gambling</A><br>

    </span>

    </body>

    </html>[/COLOR][/I]

  • [/QUOTE]
    Copy linkTweet thisAlerts:
    @kevstarliveauthorFeb 05.2012 — the above is what it will look like and all i need doing is the links. thanks for your help mate.
    Copy linkTweet thisAlerts:
    @BlackedOut271Feb 05.2012 — What are you using to write your code? Lot of syntax errors my man. I'll fix 'em but you should validate your HTML and CSS in the future.http://validator.w3.org/

    Ya, try not to make a habit of copy-and-pasting technical codes when you are starting out putting websites together. Keep it simple. I would recommend using Wordpress if you are wanting advanced sites. Not trying to be mean... You just have 4 body tags, stuff in the "body" that should be in the 'head'.

    There should only be:

    1 - <html></html>

    1 - <body></body>

    1 - <head></head>

    per html document

    And you want to make sure you don't have tags like this:

    <tag1>

    <tag2>

    </tag1>

    </tag2>

    Should be:

    <tag1>

    <tag2>

    </tag2>

    </tag1>

    will post something for you soon. Still working the kinks out...
    Copy linkTweet thisAlerts:
    @kevstarliveauthorFeb 05.2012 — thanks for that pal. your comments are truly noted. I did notice the multiple <body> in the code when I started but I just thought "if its not broken! why fix it" if you know what I mean. thanks again. your a big help.
    Copy linkTweet thisAlerts:
    @BlackedOut271Feb 05.2012 — I think you'd be better off trying this:

    http://www.flashxml.net/accordion-menu-page/4/

    If you don't think so, let me know and I'll try to get you setup with some different options.

    Combining those menus is kind of a pain. DHTML/CSS not the funnest to work with for me lol flash is so much easier!
    Copy linkTweet thisAlerts:
    @BlackedOut271Feb 05.2012 — Check out all 4 different Demo settings at the link above. Each menu seems to be a good fit. You can tweak the settings in-depth and I don't think there are any ads to worry about in your menu...
    Copy linkTweet thisAlerts:
    @kevstarliveauthorFeb 05.2012 — hey thanks for that. the JS demo's do look good but they are just not for my site. Is there no way of getting the original menu links to pop out on hover?

    you mentioned word press do they provide a cms?

    thanks
    Copy linkTweet thisAlerts:
    @BlackedOut271Feb 05.2012 — Wordpress is a cms. I use it for the majority of my websites. There are many templates to choose from (for free), as well as many for sale such as ElegantThemes.com and themeforest.net. Installing templates is cake, the backend of wordpress is extremely useful. Create / modify pages, posts, and many other things all from your Administration Panel. Install themes there as well. Each template can be modified as well via Dreamweaver or any HTML editor.

    http://codex.wordpress.org/New_To_WordPress_-_Where_to_Start

    Do study up before attempting to do advanced things (it's easy to mess up stuff sometimes)

    I would suggest trying wordpress out before installing. Wordpress sites CANNOT be viewed locally on your machine. It needs to be on a server in order to view / modify / operate.

    Give it a test run: https://en.wordpress.com/signup/

    The link above will get you an online Wordpress blog. If you think you'd like having your site Wordpressed out, I would do it.
    Copy linkTweet thisAlerts:
    @BlackedOut271Feb 05.2012 — And there's almost always a way to do anything with DHTML / CSS / JavaScript / etc. , but the good people at Adobe gave us tools like flash and Dreamweaver to avoid the headache that comes with trying to animate things via DHTML coding / debugging. I'm still dinkin around with what I originally started for you (because I guess I wanna prove to myself I still got it LOL!)

    We'll see what I come up with...
    Copy linkTweet thisAlerts:
    @kevstarliveauthorFeb 06.2012 — oh thanks for that.

    shame how you can not test it locally. I'm use to the web cms from a site that i use to work for located at https://create.tc/ I love how adding new fields is simple as filling in the clients details and hitting send and you can right click on one clients name and hit disable if you choose not to run it any more. (the site I use to work for is www.getjam.mobi). will wordpress be able to provide that? i have a wordpress account. just never used it.
    Copy linkTweet thisAlerts:
    @kevstarliveauthorFeb 08.2012 — sorted it with this simple code:

    #links li a:hover {

    background: white;

    }

    with a <li> tag on each link. thanks.
    ×

    Success!

    Help @kevstarlive spread the word by sharing this article on Twitter...

    Tweet This
    Sign in
    Forgot password?
    Sign in with TwitchSign in with GithubCreate Account
    about: ({
    version: 0.1.9 BETA 5.20,
    whats_new: community page,
    up_next: more Davinci•003 tasks,
    coming_soon: events calendar,
    social: @webDeveloperHQ
    });

    legal: ({
    terms: of use,
    privacy: policy
    });
    changelog: (
    version: 0.1.9,
    notes: added community page

    version: 0.1.8,
    notes: added Davinci•003

    version: 0.1.7,
    notes: upvote answers to bounties

    version: 0.1.6,
    notes: article editor refresh
    )...
    recent_tips: (
    tipper: @AriseFacilitySolutions09,
    tipped: article
    amount: 1000 SATS,

    tipper: @Yussuf4331,
    tipped: article
    amount: 1000 SATS,

    tipper: @darkwebsites540,
    tipped: article
    amount: 10 SATS,
    )...