Reputation: 4873
I know similar questions to this have been asked, but they all point to background-clip which isn't working.
The top is Safari, the bottom is everybody else: http://tinypic.com/r/2ng616v/5
How my HTML is structured:
<div class="parent" style="border:1px solid gray;border-radius:5px">
<div class="child"></div>
</div>
What's the best way to fix Safari with this setup?
Upvotes: 0
Views: 737
Reputation: 795
How about this solution? I added left: 0; and decreased width of .child. If you need to change its size just change width instead of left position.
.parent {
width:200px;
height:30px;
border-radius:15px;
overflow:hidden;
position:relative;
border:1px solid black;
}
.child {
width:70px;
height:30px;
border-radius:15px;
position:absolute;
left:0px;
background:red;
}
Upvotes: 1
Reputation: 3870
Try this…
background-clip: padding-box;
-moz-background-clip: padding;
-webkit-background-clip: padding;
Read more here: http://www.css3.info/preview/background-origin-and-background-clip/
Upvotes: 0