How can i draw a box using css like the answer box in stackoverflow?

Tags: css

Problem :

How can i draw a box in css? I want a box like the green one used to display the number of answers to a question in stackoverflow?

Solution :


height: 150px; /*Specify Height*/
width:  150px; /*Specify Width*/
border: 1px solid black; /*Add 1px solid border, use any color you want*/
background-color: green; /*Add a background color to the box*/
text-align:center; /*Align the text to the center*/

HTML: <div class="answerbox">4 <br /> Answers</div>

    CSS Howto..

    How to match an element's background colour with 2 semi-transparent element background colours

    How to add an image to a CSS popup box

    How to have text slide in when I hover over navbar?

    How to get a frame off animated png using CSS?

    How to write shorter css code select child?

    How can I reduce ons-list-item height?

    How to magnify a pure CSS menu item when hovering using JS?

    How can I force an image to display in its entirety with CSS?

    How could I add a header to a HTML page via CSS?

    Grunt: how to concat a .CSS file onto my compiled .SCSS files?

    ExtJS how to set button css by using pressedCls config

    How to add border/outline/stroke to SVG elements in CSS?

    How to make all select elements 15px wider?

    How to enable auto indentation in lists and list items?

    How do I create tabs in vertical alignment?

    Having 2 css code blocks in html files how to make only one work using JS?

    How to get @media to take precedence over normal styling

    How do I allow CSS files to be referenced from other domains?

    How to update current css version in

    How do you customise HTML select option menus? [duplicate]

    how to create a rotateY animation via jQuery and css 3

    How can I disable the color defined in an previously defined CSS class

    how to middle vertical-align using bootstrap input-group

    AngularJS - how to refactoring a CSS code style

    How to use CSS with Django forms?

    How to use setInterval

    How do I trigger an onclick CSS on a particular ID

    CSS: how to put one image and one block with two

    in one line not using float

    how to access the styles from CSS

    Using CSS to show gradient as well as an image