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 do I remove the white spaces around my dashboard header on reactjs

    How to replace default html checkbox with just html+css and no images?

    How to get rid of column border of gridview using CSS

    How to switch tabs and change css class on click using Angular2?

    How is does Jquery display a tooltip on this span element?

    How can I delete this “a” space under the images using CSS?

    In Ember how to use a view to change a css property and then view it?

    How to display a list in two rows?

    How to use ASP.NET Authorization Yet Permit Access to .css Files?

    Rails 4: how to identify and format links, hashtags and mentions in model attributes?

    How to force a button inside a div not to inherit the parent CSS?

    Bootstrap 3 Glyphicons not showing correctly

    How to avoid inheriting opacity property in CSS?

    How to center align a div vertically which uses bootstrap?

    hover div to show another div

    How to style an menu with CSS

    how to call browser based css?

    How to remove background from breadCrumb

    How to position nav element center under parent div?

    How to avoid an unknown height sticky footer to overlap content with CSS only?

    How can I style a button to look the same as the home button in Google Chrome with CSS? [closed]

    How to center 2 or more divs on the same line? (css)

    How to prevent text style defaults during CSS transition

    How to capitalize first line with css? ::first-line psuedo-element CSS not working

    How to set 2 images to be by the side of each other

    ASP.NET Gridview - How do I change the color properties vertically?

    How to remove text flicker in CSS?

    how do I modify a :hover style using JavaScript / jQuery?

    How do I change the colour of 'and one other person like this' when I've added it to my site?

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