Forums

Strange div position (3 posts)

  1. DotsConnected
    Member
    Posted 6 months ago #

    I can't for the life of me figure out why my second (in red) div has a distance to the menu div above it. Can anyone help me out here, it's driving me nuts: http://www.dotsconnected.nl/diensten/

    Thanks,
    Sabra

    [please don't bump]

  2. Brad Markle
    Member
    Posted 6 months ago #

    Hi DotsConnected. I ran into this myself a while back, never looked enough to find the real solution, but a "temp" solution for you would be to add this css:

    #slider { border: 1px solid; }

    You'll notice that when you add a border, it somehow adjusts the margin. I did my testing with this in firebug (check it out if you're not familiar with it).

    These links *may* help, very confusing probably if you don't dive into the code examples that are provided:

    Problem with CSS - removing border style changes page layout

    margin-top of div doubles if adjacent parent div has no border

  3. DotsConnected
    Member
    Posted 6 months ago #

    Hi Brad, I tried this and it worked. :) I still don't understand how, because all my margins are set to 0. I'm gonna read the links you provided and see if that makes any sense. Thanks!

    Sabra

Reply

You must log in to post.

About this Topic

Tags