Jump to content
Sign in to follow this  
celfyn

:after pseudo-element

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!!

Share this post


Link to post
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

Share this post


Link to post
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.

Guest
Reply to this topic...

×   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.

Loading...
Sign in to follow this  

×
×
  • Create New...