Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Styling links

Styling links

Scheduled Pinned Locked Moved Web Development
csscomhelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    astrixtech
    wrote on last edited by
    #1

    Hi, Theres a requirement like, give different image links for different sites in left navigation bar. There are 5 sites to be listed out.So I have put them in a table format by hiding quick launch menu( I modified the master page).Everything is working fine. But the next requirement is ,hovering on each link / when the link is active,it should show orange color. The following is the code of one site in master page

    <label id="lblGoogle" >

    Google</label>

    And in the css file I have written the below for hover:

    #ex1:hover
    {
    background-color:orange !important;
    color:white !important;
    }

    Instead of having ex1 as id, I have tried it with class. Even that is not working fine. Please help.:~ Many thanks

    V 2 Replies Last reply
    0
    • A astrixtech

      Hi, Theres a requirement like, give different image links for different sites in left navigation bar. There are 5 sites to be listed out.So I have put them in a table format by hiding quick launch menu( I modified the master page).Everything is working fine. But the next requirement is ,hovering on each link / when the link is active,it should show orange color. The following is the code of one site in master page

      <label id="lblGoogle" >

      Google</label>

      And in the css file I have written the below for hover:

      #ex1:hover
      {
      background-color:orange !important;
      color:white !important;
      }

      Instead of having ex1 as id, I have tried it with class. Even that is not working fine. Please help.:~ Many thanks

      V Offline
      V Offline
      vbmike
      wrote on last edited by
      #2

      Inline styling (using style= in the element html) takes precedence over any other css rules. You can see this by removing the background-color styles from the table element and the td element. The hover then works. If you put it all in an external css file the hover will most likely work the way you want it to. Try it.

      vbmike

      1 Reply Last reply
      0
      • A astrixtech

        Hi, Theres a requirement like, give different image links for different sites in left navigation bar. There are 5 sites to be listed out.So I have put them in a table format by hiding quick launch menu( I modified the master page).Everything is working fine. But the next requirement is ,hovering on each link / when the link is active,it should show orange color. The following is the code of one site in master page

        <label id="lblGoogle" >

        Google</label>

        And in the css file I have written the below for hover:

        #ex1:hover
        {
        background-color:orange !important;
        color:white !important;
        }

        Instead of having ex1 as id, I have tried it with class. Even that is not working fine. Please help.:~ Many thanks

        V Offline
        V Offline
        vbmike
        wrote on last edited by
        #3

        If you move the id ex1 to the td element it will change to orange when hovered.

        vbmike

        A 1 Reply Last reply
        0
        • V vbmike

          If you move the id ex1 to the td element it will change to orange when hovered.

          vbmike

          A Offline
          A Offline
          astrixtech
          wrote on last edited by
          #4

          Thank you vbmike. it worked. :)

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups