2 Replies Latest reply on Jun 6, 2006 10:33 AM by PegasusT4

    Create link in css ID

    PegasusT4 Level 1
      Hi,

      I have a banner I display at the top of every page using
      <div id="banner"></div>

      and

      #banner{
      height: 74px;
      background-image:url(../Images/RBB_header.gif);
      background-repeat: no-repeat;
      background-color: #000000;
      }

      This works fine, but now I want to make the image a link to another site. Is there any way of doing this in css?

      Thanks, Doug
        • 1. Re: Create link in css ID
          Level 7
          PegasusT4 wrote:

          > Hi,
          >
          > I have a banner I display at the top of every page using
          > <div id="banner"></div>
          >
          > and
          >
          > #banner{
          > height: 74px;
          > background-image:url(../Images/RBB_header.gif);
          > background-repeat: no-repeat;
          > background-color: #000000;
          > }
          >
          > This works fine, but now I want to make the image a link to another site. Is
          > there any way of doing this in css?

          Put an <a> tag inside the <div>.


          <div id="banner"><a href="whatever.htm"></a></div>

          Then use this css.

          #banner a {
          height: 74px;
          display: block;
          }

          You may have to set a width in the css as well.

          • 2. Re: Create link in css ID
            PegasusT4 Level 1
            Thanks, that works perfectly!

            Doug