How would you replicate these boxes in CSS?

Tags: html,css,design,web,typography

Problem :

I'm working through some designs and attempting to replicate them in CSS, but I'm having particular problems with text centered in boxes, like this;

enter image description here

Can a seasoned web developer show me how they would implement these simple shapes, along with perhaps an explanation?

The font is Dense, but that doesn't really matter, I just want to see how you lay it out!


Solution :

I'm having particular problems with text centered in boxes...

Simply add:


to the orange and green divs. That should fix it.

    CSS Howto..

    How do I get text to overlay on top of an image in Dreamweaver?

    How to make an image follows scrolling until a certain point

    How does one customize the appearance of jquery.perfect-scrollbar?

    how to change CSS priority (don't use !important)

    How to use CSS calc according to a certain amount of li's?

    How to combine multiple css framework with overpalling classes

    How to override a style of a specific Joomla module?

    Weird behavior when I'm alternating between showing and hiding Flot graphs

    How to make a header bar fold over the webpage css

    How to force floating blocks staying in the same row in css?

    Symfony2: How to link CSS to HTML part?

    CSS: How to position divs 2 by 2

    How to show/hide hidden HTML table rows using JavaScript (no jQuery)

    How to display parent form when input text is on focus?

    How to set textbox width fit in table cell CSS

    Images set within CSS and not showing in the HTML [closed]

    How to make a circular image in css

    How can i place a child div on a fixed position of a parent div that when i change place of parent then child should move automatically?

    how do I override user agent — using buttons from angularjs

    How to remove excess space added with \n

    html,css.php? help how output my form subissions into webpage instead of text file?

    Border display issue, not sure how to resolve

    UI Challenge - how to draw “connectors” between elements?

    Bootstrap Carousel - how to fade between slides slowly

    How to remove all CSS property inside a class, but don't remove class using jQuery

    Rails - how to build a grid-like list of product page

    How to create a fluidic list using css

    Javascript: How do I check a css style and then change another css style?

    How can I center a table relative to one column in HTML/CSS?

    jquery style sheet switcher - how to effect only theme css?