HTML/CSS - how to align boxes / divs [closed]

Tags: html,css

Problem :

I hope you can help me, it is somewhat an issue for me. I have 4 divs, and each one contains an image and a little text. I want to align them so they look like this enter image description here

Thanks in advance

Solution :

You need to be a little more specific, i.e. what your current html and css is and and example link.

A simple solution is to just float all 4 divs, giving them fixed width's and height's, clear the left float on the third div so that the final two divs drop down to the second line.

You don't even have to clear the third div if you just set a 50% width on the divs but that's dependent on if you are using fixed width's and height's, i.e responsive sites shunn fixed width's.

    CSS Howto..

    How to put images to the right and text to the left in css

    How to view CSS/HTML in GUI?

    How do I displaying a list of multiple objects, one below the other, in HTML using Django?

    How to use EMs in CSS Media Queries aligned with JavaScript events?

    how to hide html video controls in micorostf edge (fullscreen mode)

    How do I change the css so lowering one class does not lower the other?

    How to make child element width 30 precent of parent elements width using css?

    How can I force menu items to fit to column width?

    CSS: how to cascade class-specific style to children [closed]

    How do i set 100% in a div tag background?

    How to give shadow to a border

    Angularjs - bind value from directive to ng-show/hide anywhere in document

    Sencha Touch how to load custom CSS , JS if user is using PC or Tablet or SmarthPhone?

    How do I chain an infinite css animation to a one-time css animation?

    With three divs, how to make one float to the right?

    How to top-level a rich:panelMenu with it's rich:outputPanel with an h:panelGrid?

    How to set opacity for background images using css?

    How to set a div within text?

    How to Insert Images inside DIV in this case

    How to show/hide a 3 levels menu nav in css?

    how to select a class which is children of many elements

    How do I light up an entire single row by hovering on a span in one of the columns?

    Twitter Bootstrap - how to add some more margin between tooltip popup and element

    Is it possible to change somehow color profile in css

    how to give margin between li using css?

    How to select siblings between 2 tags of same class using CSS

    How to center this rotating image (CSS animation)

    how to indent jqgrid table?

    Parsley.js 2.0 How to use the provided css file

    How do I hide scroll bar by default