The standard CSS/html positioning of "flowing" Elements is horizontal (row based) => float:left
;. What do I need to do, to position them like in the example below (columnar style). Are there any CSS tags to set this somewhere? (Ideally I do not want to setup a grid, this should happen the same way automatically lilke it does in the float:left style...)
+---------------------------+
| DivBox1 |
| DivBox2 |
| DivBox3 |
+---------------------------+
After adding: 2 more boxes:
+----------------------------+
| DivBox1 DivBox4 |
| DivBox2 DivBox5 |
| DivBox3 |
+----------------------------+
Finally, after adding 2 more boxes it would look like this:
+-----------------------------+
| DivBox1 DivBox4 DivBox7 |
| DivBox2 DivBox5 |
| DivBox3 DivBox6 |
+-----------------------------+
HTML (HyperText Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.
HTML is not a programming language. It's a markup language. In fact, that is the technology's name: HyperText Markup Language.
HTML is the standard markup language for Web pages. With HTML you can create your own Website. HTML is easy to learn - You will enjoy it!
HTML is perhaps one of the easiest front-end programming languages to master. So if you want to learn HTML, then go for it! With patience and practice, you'll learn to make the most of this popular language.
There is CSS3 Columns (for the effect you talk about, the Height Balancing section is a good thing to read) which is supported in newer browsers and would look something like
#box {
column-count: 3;
-moz-column-count: 3;
-webkit-column-count: 3;
}
And would support IE 10, FF, and Chrome.
Or, you can use a tool like Masonry.js to get column like effects on a page (though this requires JS to work) and support more browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With