Log in

View Full Version : Resolved new to css



eagles051387
03-26-2009, 04:58 PM
i am new to css and im using this for my website

http://www.dynamicdrive.com/style/csslibrary/item/arrow_green_vertical_menu/

i would like to remove the links on the main menu when u click on it as well as prevent it from moving when i put in a title in the center top of the page. how can those be done

Lpe04
03-26-2009, 09:36 PM
Are you saying that you want no text to show up for an item when that item is selected? Sorry, a little confused :)

eagles051387
03-26-2009, 09:49 PM
noooo. the way it is is fine. as u see when u click on the main buttons before anythign gets pulled down it opens an external link. i would like to remove it from opening an external link

eagles051387
03-27-2009, 01:13 PM
any idea how i can remove the links from the main buttons that move down and display the sub menus?

Lpe04
03-27-2009, 01:51 PM
Well if you are talking about new buttons showing up that will take javascript.

In order to remove the links, remove the <a href and </a> tags.

Cheers

eagles051387
03-27-2009, 01:56 PM
i already tried that. when i do that i loose the green background of the image. it seems like the css and div and a tags are some how linked together

Lpe04
03-27-2009, 02:50 PM
Oh yes, I see. You will need to change the CSS to match either the li or create a span tag. Does this make sense?

eagles051387
03-27-2009, 02:54 PM
Oh yes, I see. You will need to change the CSS to match either the li or create a span tag. Does this make sense?

not really im still a novice to all this. would u mind givign me a snippet of code as an example so i know what im after

eagles051387
03-28-2009, 09:32 PM
can anyone show me a snippet of code that pertains to what was mentioned about bout the li css or span. i tried some stuff and it wouldnt work.

bluewalrus
03-29-2009, 03:27 AM
What are you looking for?

eagles051387
03-29-2009, 07:45 AM
on the main menu i linked above the main tabs of the menu like forums and java script they pull down yes and i want that but they also open an external link which i dont want. i have tried everrything to remove it but it doesnt work :(

Medyman
03-29-2009, 03:43 PM
First, this is all what Lpe04 has already said but perhaps I can make more sense of it for you:

The link is created with the anchor element (<a></a>). If you want to remove the link, you'll have to get rid of that. The problem there is that the styles are tied to that anchor element.

If you just want to remove the links from one of the items, just take out the URL in the href= attribute of the anchor tag and replace with "#". In other words, find


<li><a href="http://www.dynamicdrive.com" title="Home">Home</a></li>

and change to


<li><a href="#" title="Home">Home</a></li>

That'll get rid of the "external link". If for some reason, you want to do this for ALL the links, I'd suggest changing <a href="" title=""></a> elements into <span></span> elements and then changing the CSS styles accordingly.

eagles051387
03-29-2009, 05:10 PM
thanks guys the issue has been resolved :). last question what does the # mean in href?

Snookerman
03-29-2009, 05:42 PM
The hash in a link means it's points to an anchor on that page. You might have noticed links that say "Back to the top" or something like that and when you click them, you will be taken to the top of the page. This is done by putting an anchor in the spot where you want to be taken:

<a name="nameOfTheSpot"></a>
and then link to it with the hash:

<a href="#nameOfTheSpot">Go to the spot</a>
If you leave out the name and only use the hash, the link will lead nowhere. This is very useful and is often used when links are supposed to do something else, like react to an onClick event. If you don't use the hash, some browsers choke when a user clicks the link.

Good luck!

eagles051387
03-29-2009, 06:04 PM
well thanks i just learned something new :)

Snookerman
03-29-2009, 06:23 PM
You're welcome, glad to help!
If you feel that your issue is resolved, you can go to your first post in this thread, click http://www.dynamicdrive.com/forums/images/buttons/edit.gif then click Go Advanced and add the Resolved prefix to the thread title.
This will let other users know the problem has been solved.

Good luck with your site!