1

Within a small <div> container that sits within a larger container, I want to put <a> links in the form of <li> tags. When I put cursor:pointer within my CSS, the hover state does not display a hand and my links are not enabled.

CSS

.black_box_contain li{
    font-family:Verdana, sans-serif;
    margin-left:5px;
    font:inherit;
    list-style:none;
    margin-left:5px;
    padding:0.2em;
    display:inline-block; /* This will reduce space */
    cursor:pointer;
}

.black_box_contain li a {
    color:#0144A7;
    font-size:14px;
    cursor:pointer;
}

HTML

<div class="black_box_contain">North NJ Restaurants <br><br><p>Here are some of my favorite dishes. Hope you enjoy making and eating them as much as I did because they're really good!!</p> <br>
    <li> Italian </li> <br>
    <li> <a> French </a></li><br>
    <li> <a> Mexican </a></li><br>
    <li> <a> Indian </a></li><br>
    <li> <a> Chinese </a></li><br>
    <li> <a> Japanese </a></li><br>
</div>
1
  • Cursor Works fine forme Chrome jsfiddle.net/8ZP4Q Commented Jan 13, 2014 at 0:26

2 Answers 2

1

http://jsfiddle.net/CL6HZ/1/

<ul>
    <li> Italian </li> <br>
    <li> <a href="#"> French </a></li><br>
    <li> <a href="#"> Mexican </a></li><br>
    <li> <a href="#"> Indian </a></li><br>
    <li> <a href="#"> Chinese </a></li><br>
    <li> <a href="#"> Japanese </a></li><br>
</ul>

I added <ul></ul> tags, and a href for your a tags.

<ul></ul> or <ol></ol> tags are required for <li></li> tags.

The most important part of the <a></a> tags is the href, so if you don't know what your link will be yet, at least add the href="#" as a placeholder.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the help! The problem was this particular div was sitting within another div that was overriding the CSS. Works fine now!
1

Add "href" attribute to all your anchor tags.
E.g. <a href="#">click</a>
Thanks

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.