html - CSS border differences between browsers -
i'm making dropdown menu in pure css , i'm encountering difficulties making dropdown same in every browser.
i've tried can think of - setting margins zero, setting padding zero... , nothing seems work.
safari renders perfectly:
firefox has mysterious gap between title , dropdown:
and chrome missing 1 pixel out of border on top right concave corner:
css:
.container { position:absolute; top:50px; left:50px; margin:0px; } .title { position:relative; display:inline-block; height:25px; overflow:hidden; font-size:15pt; padding:0px; padding-top:1px; margin:0px; } .title:hover { height:200px; } .title:hover > .links { width:150px; } body { font-size:14pt; } .links { width:0px; border:1px solid grey; visibility:hidden; padding-top:0px; margin-top:0px; } .titletext { margin-left:0px; margin-top:0px; height:25px; margin-bottom:0px; } .title:hover > .titletext { border:1px solid grey; border-bottom:1px solid white; } .title:hover > .links { visibility:visible; } { text-decoration:none; color:grey; width:150px; display:block; } a:hover { background-color:purple; }
html:
<html> <body> <div class="container"> <div class="title"> <span class="titletext"> test </span> <div class="links"> <a href="">link 1 </a> <a href="">link 2 </a> <a href="">this third link</a> </div> </div> </div> </body> </html>
problem white border of title span element. browsers rendering border different way. in chrome , firefox white border touching end of element see white space @ corner. set border radius 2px space go away. i'm sure here demo.
`border-bottom-right-radius:2px`
Comments
Post a Comment