Help me get rid of extra white space

Posted on 2008-11-17
Last Modified: 2012-05-05
This is driving me crazy. Take a look at this page in Firefox with the Developer's tool bar:
View the style information.
Hover over the logo to get the red outline.
Notice the white space between the bottom red line and the right-justified menu bar. This is the white space I want to get rid of.
Now hover over the right-justified menu bar. Its div is navMainWrapper.
I set the top margin on it to 0. No affect.
I set the bottom margin of the "logo" div to 0. No affect.
How do I get rid of that white space?

Question by:alicia1234
    LVL 2

    Expert Comment

    add float left to these styles

    div#logo { margin-bottom: float:left; }
    div#logoWrapper { margin: 0; padding: 0; float:left; }

    fixed it for me
    LVL 2

    Accepted Solution

    Actually, just this one will do it

    div#logoWrapper { margin: 0; padding: 0; float:left; }
    LVL 2

    Expert Comment

    Oh and you'll come across more problems along the way if you don't use floats.

    Author Comment

    Thanks. Actually, this is all that was needed:
    div#logoWrapper { float: left; }

    Sure would like to know WHY?

    This is Zen Cart's style sheet that I'm working with.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Android App Development

    This course will involve creating widgets, customize list view, grid view, spinners, etc. Creating applications using audio, video, and SQLite database. Ending with publication on Google Play.

    Suggested Solutions

    This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
    When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
    In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now