Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Help With HTML CODE!

  1. #11
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    can you also explain what "doesn't work" ?

    for example, if I add a :hover rule to your menu, it works fine. Are you seeing something different? Please be as detailed as possible with your explanations.

  2. #12
    Join Date
    Sep 2007
    Posts
    172
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    It did works fine to me as well now. Your no repeat top right attribute did not worked with the background image code. I removed no repeat top right and it worked fine. Still couple of questions how can I make background image active on selected category? Let's say someone clicked on category Apple so the bg image should have to be active on Apple and hoovering on other. Similarly if someone clicked on Social media so the bg image should have to be active on Social media and hoovering on others. How do I do that please? You can check the live bg image on http://t-clicks.com/blog

    Thanks.

  3. #13
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    for example:
    HTML Code:
    <ul id="cat-nav" class="nav"> 
    					<li class="cat-item cat-item-1"><a href="http://t-clicks.com/blog/?category_name=uncategorized" title="View all posts filed under Apple">Apple</a> 
    </li> 
    	<li class="cat-item cat-item-3"><a href="http://t-clicks.com/blog/?category_name=helo" title="sdad">Featured</a> 
    </li> 
    	<li class="cat-item cat-item-4"><a href="http://t-clicks.com/blog/?category_name=business" title="View all posts filed under Buisness &amp; Marketing">Buisness &amp; Marketing</a> 
    </li> 
    	<li class="cat-item cat-item-5"><a href="http://t-clicks.com/blog/?category_name=gaming" title="View all posts filed under Gaming">Gaming</a> 
    </li> 
    	<li class="cat-item cat-item-6"><a href="http://t-clicks.com/blog/?category_name=mobile" title="View all posts filed under Mobile">Mobile</a> 
    </li> 
    	<li class="cat-item cat-item-7"><a href="http://t-clicks.com/blog/?category_name=social-media" title="View all posts filed under Social Media">Social Media</a> 
    </li> 
    	<li class="cat-item cat-item-8"><a href="http://t-clicks.com/blog/?category_name=startups" title="View all posts filed under Startups">Startups</a> 
    </li> 
    	<li class="cat-item cat-item-9"><a href="http://t-clicks.com/blog/?category_name=tech-gadgets" title="View all posts filed under Tech &amp; Gadgets">Tech &amp; Gadgets</a> 
    </li> 
    	<li class="cat-item cat-item-10"><a href="http://t-clicks.com/blog/?category_name=video" title="View all posts filed under Video">Video</a> 
    li> 
    	<li class="cat-item cat-item-11"><a href="http://t-clicks.com/blog/?category_name=tutorials" title="View all posts filed under Tutorials">Tutorials</a> 
    </li> 
    			</ul>
    Code:
    #cat-nav li{ background: red; } 
    /* normally, each <li> will have a red background. */
    #cat-nav:hover li{ background: blue; } 
    /* when you mouse over the menu, they will have blue backgrounds */
    #cat-nav li:hover{ background: green; } 
    /* and the specific link you hover over will have a green background. */
    /* this won't work "as is" in all browsers (e.g., IE), but it helps explain the concept. */
    also:

    "active" only applies during the click. after the mouse button goes up, the item is no longer active. if you want the new background to remain after the click, you'd need to use a different solution (likely involving javascript).

  4. #14
    Join Date
    Sep 2007
    Posts
    172
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Yes, Everything works like you said! But the last thing you did not mention how to do it! Like if I want it to be active even after the mouse goes up! Do you have any code for that please? Sorry for bothering again and again!

  5. #15
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    you'll likely need to use javascript. There are many approaches, usually involving adding a special class name to the item you want changed. If you use jQuery, for example, you could use the addClass() function when the link is clicked on.

    look into it, give it a try, and let us know how it goes.

  6. #16
    Join Date
    May 2011
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What kind of Box you are taking about.

  7. #17
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by DuncanCox View Post
    What kind of Box you are taking about.
    Please read through the thread before posting. We're talking about the <li>'s in his site menu.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •