Jump to content
  • 0

Как оформить список в списке


kopaweb
 Share

Question

Нужно хорошо оформить меню категорий на сайте. Формируется списком.

<div class="category">
<ul>
<li>1</li>
<li>2</li>
<ul>
<li>2.1</li>
<li>2.2</li>
</ul>
</ul>
</div>

сделал клд css таким:

#category {
background-color: #1f8ee3;
font-family: Arial;
font-weight: 700;
}

#category ul {
list-style: none;
padding: 0px;

border: none;
}

#category li {
border-bottom: 1px solid #90bade;
margin: 0;
}
#category li a {
display: block;
padding: 5px 5px 5px 15px;
background-color: #2175bc;
color: #000;
text-decoration: none;
width: 100%;
padding-left: 20px;
background-image: url(Images/Shop_menu/Fly_test_13_13.png);
}

html>body #category li a {
width: auto;
}

#category li a:hover {
background-color: #2586d7;
color: #fff;
}

Как зделать так чтоб подкатегории отображались подругому (отсуп от левого краю + ругой фон)?

Edited by kopaweb
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
Это я тут просто накидал быстро, и опустил. А на сайте правильно. Но вот подкатегория отображается так само как и категория.

Ну а ты в коде то где прописал стили для внутренних списков?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy