css run-time expression


/ Published in: CSS
Save to your folder(s)

Writing expressions in CSS, used to make decisions at run-time.


Copy this code and paste it in your HTML
  1. <!--[if lte IE 6]>
  2. <style type="text/css" media="screen">
  3. .wrap,
  4. .searchpanel,
  5. .messages,
  6. .constrain,
  7. .footer div {
  8. width: expression(document.body.clientWidth > 1000 ? "1000px" : document.body.clientWidth < 912 ? "765px" : "98%" );
  9. }
  10. </style>
  11. <![endif]-->

URL: <na>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.