I originally had floating divs and i wanted content inside these floats to be vertically aligned.
This was giving me troubles so i had to remove floats.
I came around this fiddle referred in this post.
And used the fiddle to get desired layout. But i am facing troubles vertically aligning divs.
I tried,
vertical-align:middle;
display:table-cell;
For parent
containers and
display: inline-block;
for child
contents.
1) In this fiddle. I want the right
to be vertically aligned inside right-container
.
To say in other words. I want to have two divs
vertically aligned inside a main div
, and divs inside each of two divs need to be vertically alined.
2) How can i achieve the vertical alignment inside the floats? So i may not change my original layout. Say in the fiddle right and left are floats
.
Need some pointers.
Edit:
This might be simpler with tables. But i am looking for div based solutions.