Jump to content

:after pseudo-element


celfyn
 Share

Recommended Posts

Is it possible to use the pseudo-element :after to insert a line break after the defined element? For example:span:after{content: <br />;}so when a span comes up in the html, it will display the content after it on another line, like so.just some <span>text</span> - will becomejust sometextCheers!!

Link to comment
Share on other sites

:before and :after do not work with IE...pseudo-elements at W3schoolsalthough they will work with IE6 (still 40% of your audience) if you use Dean Edwards' javascript library called "ie7"—MSIE compliance patch—and if you look at his test page, you'll see the way to achieve the effect you want is not to use <br /> but to style the "after" bit as "display:block", which puts it on a new line:using "after" .Someone with MSIE7 could test whether Dean's fix works for it too. I'm not near a PC tonite.And, if you do have happen to have IE6, could you possibly have a look at this page of mine, and tell me exactly where the list of links is, and whether they are usable?? I've posted very recently here, but have gotten no takers so far. cheersctozcheck in IE6, please

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...