css - auto columns to have each LI of UL justified on a single line -
i have unordered list number of list elements. don't know exact number of li elements in said ul -- e.g., either 3 or 4 elements (all concise ones) -- display each li block (not actual list), , want use columns feature set on 1 line, equally centred / justified.
however, if columns: 4, , have 3 elements, they're displayed if fourth element missing. there way them displayed if columns: 3 has been specified? (i've tried setting columns auto, didn't seem in browser tested.)
basically, want columns css property of ul set number of li children ul has, in css.
by changing display property of li element,you can make (3 or 4 lis) center aligned of window.
ul#registrar { text-align: center; } ul#registrar li { display: inline-block; } <ul id="registrar"> <li><a href="/reg.com">reg.com</a></li> <li><a href="/reg.ru">reg.ru</a></li> <li><a href="/nic.ru">nic.ru</a></li><li><a href="/nic.ru">nic.ru</a></li> </ul>
Comments
Post a Comment