0

Web Dev Code Repo 21.2 Styling lists

I put in a class called trans for the list, and in the css, but nothing works. please help. I get confuaed between usung the # and the (.) https://code.sololearn.com/WqAmMfhcZSTW/?ref=app

25th Mar 2022, 6:58 AM
Stacey Prahl
Stacey Prahl - avatar
3 Réponses
0
You talk about this? #trans { list-style-type:square; list-style-position:inside; padding-left:30px; } First in html it is class not id, so remember for class we use ".", but for id we use "#", we can have only 1 id, and many class with same name. But your code wont work if you just change id to class, and reason is: we can't have list nested inside paragraph. So solution is simple, just modify little html code, i placed class to ul directly so it can be selected easier in css (i see you use simple selector, don't know did you learned full css course, so i make it simple) <div><b>Transport</b> <ul class="trans"> <li>Bus: lines 42, 69, 72, 82, and 87</li> <li>Metro: Trocadero, Eole militaire</li> <li>Train: Champ de Mars - Tour Eiffel, line C</li> </ul> </div> If you didn't learned about div tag it is fine, you will soon. Div is block level element used as container to wrap other elements, to make easier layout...
27th Mar 2022, 12:19 AM
PanicS
PanicS - avatar
0
Also i see you placed full table inside p tag, don't do this. Paragraph are used to place some text, you can add some text format tag inside it like (b, em, strong...) or also img tag Here is some list of posible tags what can be nested inside paragraph: https://stackoverflow.com/questions/9852312/list-of-html5-elements-that-can-be-nested-inside-p-element
27th Mar 2022, 12:21 AM
PanicS
PanicS - avatar
0
thank you
4th May 2022, 9:21 AM
Stacey Prahl
Stacey Prahl - avatar