I\'ve been doing this simple page with a text field and two select fields, where I can choose a text color and a text size. I put some borders with diferent colors to each d
Your div has a style of "display: inline;", Change that to "display: inline-block;"
div
{
display:inline;
}
change to:
div
{
display:inline-block;
}
Think of it this way. Inline elements aren't meant to contain block elements. For instance, a (which is an inline element) can span from the end of one line to the beginning of the other, so it has no well defined width or height:
..... ..... ..... ..... ..... ..... ..... Hello
World ..... ..... ..... ..... ..... ..... ...
But you don't want to make it a block (or
Hello ..... ..... ..... ..... ..... .....
World ..... ..... ..... ..... ..... .....
So if you declare an element inline-block, you can have several blocks side-by-side
HelloWorld