Tuesday, 3 September 2013

safari margin-top problems

safari margin-top problems

I try to make the "To some where" (<-- I know misspelled) box to be on the
same height in every browser but it gives me problems with safari (the box
is higher). It is strange that on all the other browsers it does work.
HTML:
<!DOCTYPE html>
<body>
<div id="block">
<h2>BLOCK</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
<div id="problemDiv"><a href="someWhere">To some where</a></div>
</div>
</body>
</html>
CSS:
#block{
position : absolute;
padding-left : 10px;
padding-right : 10px;
width : 300px;
height : 200px;
background-color: teal;
z-index : -5;
}
#block h2{
padding-top:2px;
}
#block p{
position : absolute;
z-index : 0;
margin-left : ;
margin-top : -2px;
width : 302px;
font-size :17px;
}
#problemDiv{
position : absolute;
margin-left : 140px;
margin-top : 100px;
font-size : 17px;
width : auto;
opacity : 1;
border-bottom: solid white;
}
Here is the JSFIDDLE to see the code and work with it:
http://jsfiddle.net/qorzyking/L4dMn/

No comments:

Post a Comment