Related Tags:
HTML Hypertext Markup Language, a standardized system for tagging text files to achieve font, colour, graphic, and hyperlink effects on World Wide Web pages. Learn More, CSS (Cascading Style Sheets) CSS stands for Cascading Style Sheets. CSS describes how HTML elements are to be displayed on screen, paper, or in other media. CSS saves a lot of work. It can control the layout of multiple web pages all at once. External stylesheets are stored in CSS files. Learn More,

how to separate items with pipeline in ul li structure using css?

Description:In my site I have some link items structured in ul li , I want them to style pipe separated.
I.e for example I have following html.
<ul class='MyNav'>
<li><a href='/home'>Home</a></li>
<li><a href='/home'>About</a></li>
<li><a href='/home'>Contact</a></li>
</ul>
and i want to style as
Home | About | Contact

Posted by: | Posted on: Nov 15, 2017

1 answers

Replies

1

Hi,
Easiest way is to add following css chunk to your css file to get the desired result.

 
.MyNav li + li::before {
content: " | ";
}

Replied by: | Replied on: Nov 16, 2017



Reply
×

Code block Hyperlink bold Quotes block Upload Images

Preview