I've been trying to create a div that will automatically fill the rest of the space on the page. Here is an example (not working properly):
http://codepen.io/anon/pen/xbGLYX
#autoWidth
should get the width depending on the content, and #fullWidth
should fill the rest of the available space without creating a new line space.
As you see, there is #autoWidth
and #fullWidth
. I added float:left to both, to make them on the same line, however after styling the #fullWidth
div (that needs to fill the remaining space on the same line with #autoWidth
) it automatically created a second line.
There are other issues as well, for instance, the background-color
property is not working as it should, for the container div.
I believe these are all connected issues with my question, and would appreciate a good solution.
PS - Looking for a CSS-only solution. As little hack as possible.