Jump to content
Sign in to follow this  
cyber0ne

:after Pseudo-element

Recommended Posts

I'm using the :before and :after pseudo-elements in a couple places on a website I'm working on, but I've noticed something about it... It seems that anything placed on the page by these elements is always rendered as plain text to the client, even if it's an HTML tag. Example:http://www.cyber0ne.com/test/css/test.htmlIs there a way to get the browser to treat that like an HTML tag?-cyber0nehttp://www.cyber0ne.com

Share this post


Link to post
Share on other sites

Nope, but you can simply set a minimum height to your divs so that the floated images stay inside them.

<style type="text/css">.Article{   min-height: 100px;   margin: 1em 0em 1em 0em;   background: #eeeeee;}</style><!--[if lte IE 6]><style type="text/css">.Article {   height: 100px;}</style><![endif]-->

Unfortunately, IE doesn't support min-height, but treats height the same. so that's why I included a conditional comment.

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