I would like to create a 2 text column with a div in the center like below.
I am using this code:
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
When I place another div within the div class, it formats to go into two columns. How do I fix this?
Use these following CSS:
And check with these below divs:
It is works for me. I hope this helps to you.
Answering this to your request of keeping css columns.
Picked up the idea from here: http://css-tricks.com/float-center/ as per @Josh's suggestion.
See this updated fiddle of yours: http://jsfiddle.net/aX47K/99/
The trick is to use css
:before
or:after
pseudo elements on each column (represented by divs), with fixed width and height and floated opposite. This will create a dummy space which we can then fill with our image (or another div) using absolute positioning.However, please note that this approach is still a hack.
Try creating separate Div classes for everything and position your div class for the div the place you wanted. Don't create Div tags , just create classes !
You need to create a separate class for
Just check below example
I imagine you are long done with this but I have an example here which might prove to be useful. There is a bit of nuance here which I don't want to explain unless someone asks. I think with a touch of jQuery we could nail it down.
Here is my Fiddle Example. It is responsive as well so you can expand the window to see that. Again it is kinda quickly done. If you choose a responsive container just look for the subtle breakpoints.
Fiddle