Clear css pseudo-class after

The 'after' pseudo-class allows you to append styling and content after a selector. If you've applied this to class used throughout your application styling, you might want to remove it for specific selectors, here's how:

#selector:after
{
   display: none;
}

Example

Add a one pixel bottom border to all your H2 tags:

h2:after
{
    content: "";
    display: block;
    height: 1px;
    border-top: 1px solid #ffffff;
}

Remove it for H2's with a specific class:

<h2 class="no-line">Hello World</h2>

.no-line:after 
{
   display: none;
}
Sign Up
comments powered by Disqus
Sign Up

Popular Tags

350x250

Need a web developer?

If you'd like to work with code synthesis on your next project get in touch via the contact page.