Results 1 to 5 of 5

Thread: Mouseover Tabs ***Centering***

  1. #1
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Mouseover Tabs ***Centering***

    1) Script Title: Mouseover Tabs

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...seovertabs.htm

    3) Describe problem:

    I've applied the script to my header. Please see my progress here: http://www.kisssmileandskincare.ca/new/header.htm

    What I'm wondering is how to have the submenu centered below each image rather than flush left. Do I change this in the .js or .css document?

    Thanks so much in advance for your help.

    I'm almost there!!!!
    Last edited by dani-wu; 12-15-2008 at 10:35 PM. Reason: Resolved

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Try this:
    Code:
    .tabsmenucontent {
    display:none;
    position:relative;
    margin:auto;
    }

  3. #3
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't think that will work....

    I've done some horrible work around with spacers!!!!
    http://www.kisssmileandskincare.ca/new/

    Seems to be working except when you reach "contact us" on the right. I can't stop it from bumping to the line below *does that even make any sense*???

    Here are the links to my other files:
    http://www.kisssmileandskincare.ca/n...seovertabs.css
    http://www.kisssmileandskincare.ca/n...nucontents.htm
    http://www.kisssmileandskincare.ca/new/mouseovertabs.js

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

    Default

    There are many ways to indent the sub menu contents so it lines up with the tab that shows it. You can try using CSS's margin-left property, for example:

    Code:
    <div class="tabsmenucontent">
    <ul>
    <li><a href="http://www.javascriptkit.com">Home</a></li>
    <li><a href="http://www.javascriptkit.com/cutpastejava.shtml">Free JavaScripts</a></li>
    <li><a href="http://www.javascriptkit.com/javatutors/">JS Tutorials</a></li>
    <li><a href="http://www.javascriptkit.com/jsref/">JS Reference</a></li>
    <li><a href="http://www.javascriptkit.com/domref/">DOM Reference</a></li>
    <li><a href="http://www.javascriptkit.com/java/">Applets</a></li>
    <li><a href="http://www.codingforums.com">Coding Forums</a></li>
    </ul>
    </div>
    
    <div class="tabsmenucontent" style="margin-left:100px">
    <ul>
    <li><a href="http://www.cssdrive.com">Gallery</a></li>
    <li><a href="http://www.cssdrive.com/index.php/menudesigns/">Menu Designs</a></li>
    <li><a href="http://www.cssdrive.com/index.php/news/">News</a></li>
    <li><a href="http://www.cssdrive.com/index.php/examples/">Examples</a></li>
    
    </ul>
    
    <div class="tabsmenucontent" style="margin-left:250px">
    <ul>
    <li><a href="http://www.cssdrive.com">Gallery</a></li>
    <li><a href="http://www.cssdrive.com/index.php/menudesigns/">Menu Designs</a></li>
    <li><a href="http://www.cssdrive.com/index.php/news/">News</a></li>
    <li><a href="http://www.cssdrive.com/index.php/examples/">Examples</a></li>
    
    </ul>
    </div>
    </div>
    
    <br style="clear:left" />
    DD Admin

  5. #5
    Join Date
    Dec 2008
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Thank you!!!

    This simplified everything!

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
  •