Results 1 to 4 of 4

Thread: CSS Menu highlight

  1. #1
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS Menu highlight

    Script: CSS Menu highlight
    http://www.dynamicdrive.com/dynamici...shighlight.htm

    Hello!
    I like this script since it is small. But the problem is that it automatically becomes a vertical menu. I would like it to be horizontell and cannot understand why it becomes vertical. There are no linebreaks but in order to make it horizontell I have to put it in a table and force it.
    Isn't there some easy way so it becomes horizontel?

    <style>
    A.menulink {
    display: block;
    text-align: left;
    text-decoration: none;
    font-family: verdana;
    font-size:10px;
    color: #000000;
    BORDER: 1px;
    border: solid 1px #FFFFFF;
    }

    A.menulink:hover {

    text-align: left;
    text-decoration: none;
    font-family: verdana;
    font-size:10px;

    BORDER: 1px;
    border: solid 1px #6100C1;
    background-color:#EFEFEF;

    }

    </style>
    Last edited by DJ Steffo; 01-15-2005 at 12:08 PM. Reason: Forgot link to script

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hmm i'm confused- this is a vertical menu by design due to the table layout that follows. I guess you can try turning it into a horizontal menu, but some structural changes need to be made to the table obviously to convert the table cells so they're adjacent to one another.

  4. #4
    Join Date
    Dec 2004
    Posts
    177
    Thanks
    0
    Thanked 18 Times in 17 Posts

    Default

    It would be very easy. First, if you were looking to keep the table (which technically wouldn't be necessary):

    Code:
    <table>
      <tr>
        <td width="198"><a href="./blah.hmtl" class="menulink">Blah1</a></td>
        <td width="198"><a href="./blah.hmtl" class="menulink">Blah2</a></td>
        <td width="198"><a href="./blah.hmtl" class="menulink">Blah3</a></td>
      </tr>
    </table>
    But, since all the work is done via CSS (which, I might add, is veeerry easy, and a good idea to learn) technically all you would need to do is get rid of the table, and change display:block, to display:inline. Or even lose that line altogether. Block automatically inserts a line break after the element.

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
  •