how to make an oval in css?
All you have to do is to change border-radius: 40px to border-radius: 50%. .oval { width: 160px; height: 80px; background: #a84909; border-radius: 50%; } <div class=”oval”></div>
All you have to do is to change border-radius: 40px to border-radius: 50%. .oval { width: 160px; height: 80px; background: #a84909; border-radius: 50%; } <div class=”oval”></div>
Like this : .arrow { border: solid 10px transparent; border-right-color: #FFF; } Demo : http://jsfiddle.net/sparkup/edjdxjf2/ UPDATE : It can also be achieved without empty elements with the css property :before element:before { content: “”; position: absolute; top: 50%; // half way down (vertical center). margin-top: -15px; // adjust position, arrow has a height of 30px. … Read more
use inset with round property : inset(0% 45% 0% 45% round 10px)
You can achieve a transparent cut out circle with 2 different techniques : 1.SVG The following examples use an inline svg. The first snippet uses the mask element to cut out the transparent circle and the second hollow circle is made with a path element. The circle is made with 2 arc commands : With … Read more
You could use a skewed and rotated pseudo element to create a responsive triangle under the link : DEMO (resize the result window to see how it reacts) The triangle maintains it’s aspect ratio with the padding-bottom property. If you want the shape to adapt it’s size according to it’s content, you can remove the … Read more
New answer : To make the table cells square, you can use the aspect-ratio property on a div inside the td element. Like this : table { width: 90%; } td { width: 33.33%; position: relative; } td .content { aspect-ratio: 1 / 1 ; background: gold; } <table> <tr> <td><div class=”content”>1</div></td> <td><div class=”content”>1</div></td> <td><div … Read more
You can do it without pseudo-elements, just with border-image: linear-gradient .fancy-border { width: 150px; height: 150px; text-align:center; border-top: 5px solid; border-image: linear-gradient(to right, grey 25%, yellow 25%, yellow 50%,red 50%, red 75%, teal 75%) 5; } <div class=”fancy-border”> my content </div>
You forgot to set the width of the border! Change border: red; to border:1px solid red; Here the full code to get the circle: .circle { background-color:#fff; border:1px solid red; height:100px; border-radius:50%; -moz-border-radius:50%; -webkit-border-radius:50%; width:100px; } <div class=”circle”></div>
Use drop-shadow: maybe this article (box-shadow-vs-filter-drop-shadow) will help you
.red.box { background-color: red; transform: perspective( 600px ) rotateY( 45deg ); } Then HTML: <div class=”box red”></div> from http://desandro.github.com/3dtransforms/docs/perspective.html