ASP.NET Slide Menu - Knowledge Base

« Back to Knowledge Base list

How to add a separator between parent items in SlideMenu?

Q:

How to add a separator (image, text or smth else) between parent items in SlideMenu?


A:

Use the :before and :after CSS pseudo class to place text or an image before and after each SlideMenu parent element.

CODE:

.SMParent {

    background-color:#efefdd;
    border-bottom:1px solid #cccccc;
    font:bold 12px arial;
    color:#555555;
    text-align:left;
}
.SMParent:before {
    padding-right: 5px;
    content:" and some text before.";
}
.SMParent:after {
    font-style: italic;
    content: " and some text after.";
}