Place 4 columns in a row

Asked

Viewed 714 times

0

The point is, I am extremely Newbie in html/css and I’m modifying a theme of wordpress.

The theme works from columns, and I need help specifically in this..

As you can see, they are service "boxes", these boxes do not seem to have defined width, that is, their width is defined by the width of the column in which they are inserted.

In the photo, there are 3 boxes, inserted in a column of 30.66% de width, hitherto perfect.

But I need to put four more down, exactly the same width as these, the problem is that when I put the fourth, it breaks the line and goes to the bottom line, as shown in the second print segunda foto

I want to be able to put 4 boxes of these in just one row, how can I do that? Any guidance?

  • 3

    Put some code to help members understand their problem.

  • Have you tried to decrease their width to a value less than 25%?

  • Hi, Diogo.Yes, I changed that, but as I said, I wanted them to stay at the same width as the top line, that is, 30.66%. I want the column Ivs not to break the line when they arrive on Wednesday, for example.

1 answer

2


Just an update on how I managed to fix.

My problem was this, I wanted to create a div that was wider than its div-parent, so that it would align the inside boxes in full width, without breaking the line when arriving at the maximum widht of the div-parent

.filhofw {
position: relative;
width: 100vw;
left: calc(-50vw + 50%);

Then I just left the width of the boxes in px and aligned everything, put them inside the child (full width)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.