[snippet]Show ad block in IE but not Firefox

  • Zealous
  • Guru
  • Guru
  • User avatar
  • Posts: 1244
  • Loc: Sydney

Post 3+ Months Ago

I found this snippet of code while doing some research and i figured it may come in handy for someone here, simple code but the one question i have it should load in firefox not IE :P

Quote:
<html>
<head>
<title>Ad Show Hide demo</title>
<style>
#adDiv {
display:none;
}
</style>

<!--[if IE]>
<style>
#adDiv {
display:block;

/* some extra styles to make the ad stand out */
border:1px solid #eee;
padding:10px;
}
</style>
<![endif]-->

</head>
<body>
<div id="adDiv">Stick your advert in here</div>
<h2>Ad test</h2>
<p>Some page content</p>
</body>
</html>
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.