html - Insert line break between two inline-block elements with CSS -


I am trying to explain how a break element between these two can be linked to div elements in Bella .

The challenge here is that the elements should focus, but also that I should be able to force line breaks. If I use float, I can control this line by breaking:

  .article: after {content: '\ A'; White Location: East; }   

But then the elements are clearly no longer focused.

This is straightforward to Bella.

Edit: To clarify the need for a display: inline-block , move on an image to see the new Bella, overlay on the image.

  & lt; Div id = "post" & gt; & Lt; Div class = "article" & gt; & Lt; div class = "inner" & gt; & Lt; Div class = "overlay" & gt; & Lt; / Div & gt; & Lt; Div class = "content photo" & gt; & Lt; Img style = "max-width: 45w;" Src = "http://dummyimage.com/600x400/000/fff" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "article" & gt; & Lt; div class = "inner" & gt; & Lt; Div class = "overlay" & gt; & Lt; / Div & gt; & Lt; Div class = "content photo" & gt; & Lt; Img style = "max-width: 38vw;" Src = "http://dummyimage.com/600x400/ff0000/fff" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;   


#posts {text-align: center; } .form {margin: 10px; Status: Relative; Float: None; Display: Inline-block; Vertical-alignment: bottom; } .form: after {content: '\ A'; White Location: East; } .Author. Player {status: relative; Width: 100%; Height: 100%; Display: -WebKit-box; Display: -moz-box; Exhibit: -MM-Flexbox; Display: -WebKitFlex; Exhibit: Flex; -WebKit-box-orient: vertical; -moz-box-orient: vertical; -WebKit box-direction: reverse; -moz-box-direction: reverse; -WebKit-Flex-Direction: Column-reverse; -mfflex-direction: column-reverse; Flex-direction: column-reverse; } .Article. Overlay {Height: 101%; Width: 101%; Margin: 0 -25px; Status: Completed; Top: -1px; Correct: 0; Bottom: 0; Left: 0; Hidden flurry; Background color: RGBA (0,0,0,0,0,0); Webkit-Infection: Background Color .3s Easy-Out; -MOZ-infection: background-color .3s smooth-out; -O-Infection: Background Color .3s Easy-Out; Transition: Background Color .3s Easy-Out; } .content {status: relative; } IMG {max-width: 100%;

instead of blocks elements inline-blocks By breaking the line, he will keep them focused:

  .article {margin: 10px; Status: Relative; Float: None; Display area; Vertical-alignment: bottom; }   

This is because .article divs inherit from the original div from text-align: center . Since images have inline elements, this causes them to be centered ...

edit

Another solution, inline- Block property is to increase the gap between elements by using word-spacing on parents (because they are inline) to set it with a viewport unit (eg VW) Will break completely:

  #posts {text-align: center; Word-spacing: 100vw; }    

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -