0

I have a case where when specifying a fluid margin-top like for instance 20% and when I resize my browser window horizontally, the margin-top increases. This is a bit unexpected for me. I am looking for a quick fix for this ..

<html>
    <head>
        <title>Make yourself lucky</title>
        <meta name="description" content="Make yourself lucky" />
        <style type="text/css">
            #slideshow {
                float: left;
                background-color: red;
                width: 100px;
                height: 100px;
                margin-top: 20%;
            }           
         </style>
    </head>

    <body>
        <div id='wrapper'>
            <div id='slideshow'>
               slideshow
            </div>
        </div>
    </body>
</html>

http://jsfiddle.net/eVfCc/

Tepken Vannkorn
  • 9,648
  • 14
  • 61
  • 86
Manish Basdeo
  • 6,139
  • 22
  • 68
  • 102

1 Answers1

0

Try adding position:absolute to the same CSS.

Mahesha999
  • 22,693
  • 29
  • 116
  • 189