Jump to content

:after Pseudo-element


cyber0ne

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

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

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
×
×
  • Create New...