Friday 15 May 2015

html - UL class not working? Only LI works? -


I just started HTML / CSS two days ago .. Please be easy on me. I am currently building a website for some reason, I can not get the HTML class / ID to render with CSS. To make this work, I have to create a category for each list. How do I create it so that the whole class for the whole?

HTML

 When I remove  
  • class = "name_here"
  • & lt; / li & gt; & gt; div & gt; & lt; div & gt; & lt; div & gt; & lt; ul class = "lastbit" Lt; li & gt; & lt; img src = "../ images / bestfood servicesv_34.jpg" width = "85" height = "29" />
  • gt; & lt; / a & gt; & lt; / li & gt; & lt; li & gt; Lt; a href = "#" & gt; IMG src = "../ Images / BestFoodServices WEB_38.jpg" width = "69" height = "16" /> gt; & lt; / a & gt; & Lt; / li & gt; & Lt; Li & gt; & Lt; A href = "#" & gt; & Lt; IMG src = "../ Images / BestFoodServiceVB39.jpg" width = "100" height = "16" /> & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Ul class = "lang" & gt; & Lt; Li class = "lang" & gt; & Lt; A href = "#" & gt; & Lt; Img src = "../ Images / BestFoodServiceVB41.jpg" width = "29" height = "14" /> gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "lang" & gt; & Lt; A href = "#" & gt; & Lt; IMG src = "../ Images / BestFoodServicesWave4.jpg" width = "39" height = "17" /> gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; Ul class = "social" & gt; & Lt; Li class = "social" & gt; & Lt; A href = "http://facebook.com" & gt; & Lt; IMG src = "../ Images / BestFoodServiceVB7.jpg" width = "30" height = "2 9" / & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "social" & gt; & Lt; A href = "http://twitter.com" & gt; & Lt; IMG src = "../ Images / BestFoodServices_29 .jpg" width = "30" height = "2 9" / & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; Li class = "social" & gt; & Lt; A href = "http://linkedin.com" & gt; & Lt; IMG src = "../ Images / BestFoodServiceVB31.jpg" width = "30" height = "2 9" / & gt; & Lt; / A & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; / Div & gt;

    css

      .navi {list-style: none; Display: Inline; Margin-left: 5px; Status: Relative; Top: 5px; } .lastbit {list-style: none; Display: Inline-block; } .lang {list-style: none; Display: Inline; } .social {list-style: none; Display: Inline; }    

    You should read more on the selectors in CSS In essence, what you are doing with it:

      .social {list-style: none; Display: Inline; }   

    It is saying that everything given with class social is applied to it.

    This li element applies to each class in the class as you want, even though when you put that code on ul So it is implementing styles to not ul and li . To fix this, you need to specify that you want to change the selector a little bit by styling:

      .social li {list-style: none; Display: Inline; }   

    It has been said above that all the elements which are descended from the item with category social should be of styles that you want.

  • No comments:

    Post a Comment