Recently, I delved into the world of web-oriented coding and started learning HTML/CSS from a book. Currently, I am navigating through the chapter that covers creating columns and utilizing their properties.
While working on a 3-page website for practice, I encountered an issue when trying to format text into columns. Specifically, setting the column width has me stumped.
Below is the code snippet along with the corresponding CSS:
section {
column-count: 3;
column-width: 3em;
}
<! DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title> Test colonne</title>
<link rel="stylesheet" type="text/css" href="css_colonne.css">
</head>
<body>
<section>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
</section>
</body>
</html>
I'm facing difficulties with setting the column width, and even using -moz-column-width doesn't seem to solve the issue. Can someone spot what's going wrong? Column division works but the formatting just won't comply.