+ 1

Bullet Allignment

i added <center> <ul> <li> text here</li> </ul> </center> it shows my bullets on the far left of the screen instead of going with the text i made

31st Oct 2016, 3:15 PM
Martin Mendoza
Martin Mendoza - avatar
2 Antworten
+ 2
<center> is outdated, please don't use it! A modern alternative is using 'flex': https://code.sololearn.com/Ww0w70E32apC/#html <style> .mylist{ display: flex; flex-direction: column; align-items: center; } </style> <ul class='mylist'> <li>Hello</li> <li>This is super-centered!</li> </ul>
31st Oct 2016, 5:05 PM
Schindlabua
Schindlabua - avatar
0
remove <center> and use it inside dev with class <div class="center"> Give your div a class name center. Assuming your div width is 200px, margin:0 auto will center and text-align:left will align the text to the left while maintaining its centering due to margin auto. and use this as CSS style code <style> .center{ width:200px; margin:0auto; text-align:center;} </style> don't forget to close div </div>
31st Oct 2016, 4:28 PM
ezak ezat
ezak ezat - avatar