How to draw a circle with text in the middle?

Setting a line-height the same value as the height of the div will show one line of text vertically centered. In this example the height and line-height are 500px. Example JSFiddle .circle { width: 500px; height: 500px; line-height: 500px; border-radius: 50%; font-size: 50px; color: #fff; text-align: center; background: #000 } <div class=”circle”>Hello I am A … Read more

Easier way to create circle div than using an image?

Here’s a demo: http://jsfiddle.net/thirtydot/JJytE/1170/ CSS: .circleBase { border-radius: 50%; behavior: url(PIE.htc); /* remove if you don’t care about IE8 */ } .type1 { width: 100px; height: 100px; background: yellow; border: 3px solid red; } .type2 { width: 50px; height: 50px; background: #ccc; border: 3px solid #000; } .type3 { width: 500px; height: 500px; background: aqua; … Read more

How does this CSS produce a circle?

How does a border of 180 pixels with height/width-> 0px become a circle with a radius of 180 pixels? Let’s reformulate that into two questions: Where do width and height actually apply? Let’s have a look at the areas of a typical box (source): The height and width apply only on content, if the correct … Read more

How do I create a teardrop in HTML?

SVG approach: You can achieve the double curve easily with an inline SVG and the <path/> element instead of the <polygon/> element which doesn’t allow curved shapes. The following example uses the <path/> element with: 2 quadratic bezier curve commands for the 2 top curves (lines beginning with Q) 1 arc command for the big … Read more

How to use CSS to surround a number with a circle?

Here’s a demo on JSFiddle and a snippet: .numberCircle { border-radius: 50%; width: 36px; height: 36px; padding: 8px; background: #fff; border: 2px solid #666; color: #666; text-align: center; font: 32px Arial, sans-serif; } <div class=”numberCircle”>30</div> My answer is a good starting point, some of the other answers provide flexibility for different situations. If you care … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)