Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Pesky CSS problem (PC vs Mac differences)

    I am setting up a menu navigation for a website I am working on... However I am running into a pesky CSS issue. The menu looks fine/great on PC versions of IE and Firefox, however on Linux or Mac it appears slightly different and funky. The problem is that if I tweak the CSS to make the menu look good on the Mac, it then looks funky on in IE6, IE7, and Firefox on the PC.

    Has anyone run into this issue before or recommend an appropriate solution? Thanks in advance!

    Below are screenshots and the CSS code.

    Screenshot on Windows IE6:


    Screenshot on Mac Firefox:

    (Note the extra space below the Inbox button)

    CSS Snippet:

    #mainnavin {
    height:30px; width:673px;
    background-color:#687A9C;
    color:#fff;
    background: url(../images/mainnavbg.gif) center center repeat-x;
    overflow:auto;
    }

    #mainnavin ul{
    height:30px;
    font-size:12pt;
    margin: 0;
    padding: 0;
    float: left;
    background: url(../images/mainnavbg.gif) center center repeat-x;
    }

    #mainnavin ul li{
    display: inline;

    }

    #mainnavin ul li a{
    padding:4px 20px;
    float: left;
    color: #fff;
    text-decoration: none;
    border-right: 1px solid #283B76;
    }

    #mainnavin ul li a:visited{
    color: #fff;
    }

    #mainnavin ul li a:hover, #mainnavin ul li .current{
    color: #fff;
    background: url(../images/mainnavbg2.gif) center center repeat-x;
    }

    HTML Snippet:

    <div id="mainnavin">
    <ul>
    <li><a href="index.html">Welcome</a></li>
    <li><a href="inbox.html" class="current">Inbox</a></li>
    <li><a href="#">Features</a></li>
    </ul>
    </div>
    Last edited by inbetweendays; 12-23-2007 at 09:55 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello inbetweendays,
    Extra spaces like that are often caused by different browsers default margins or padding...
    It might help to clear all margin/padding by adding this to your CSS
    Code:
    * {
    margin: 0;
    padding: 0;
    }
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Excavator. Thank you for the feedback... I actually already have that bit of code at the top of my CSS file but still seem to be getting this issue. Any other suggestions? Thanks!

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Pretty hard to say with only a snippet and no images, not to mention no Mac ... could be anything.

    That's the problem with only a snippet of code, the person helping can't see that you already used the * to clear margins/padding. Better to give us a link or post the whole code so people can see everything that might be causing the problem.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,666
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    Play around with line height that’s probably a different default in different browsers.


  •  

    Posting Permissions

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