Apply style to particular HTML List (UL) using CSS

Last Reply 4 months ago By dharmendr

Posted 4 months ago

Actually i am using one ul tag for menu in ecommerce website and other one for side navigation bar but if i m doing styling in side ul tag, it is also applied to menu ul and i m not able to use 2 multiple ul tag in my ecommerce website.How to use two ul tag & after that how to style them invidually 

You are viewing reply posted by: dharmendr 4 months ago.
Posted 4 months ago Modified on 4 months ago

Hi Amit1992,

Give unique class name to your UL element and apply css property to it.

Example :

<html xmlns="">
    <style type="text/css">
        .SideNavigation li
            color: Red;
            font-size: x-large; 
            /*More css properties*/
        .Menu li
            color: Green;
            font-size: xx-large; 
            /*More css properties*/
    <ul class="SideNavigation">
    <ul class="Menu">
        <li>About Us</li>
        <li>Contact Us</li>