www.webdeveloper.com
Results 1 to 2 of 2

Thread: Conditional CSS issue

  1. #1
    Join Date
    Nov 2011
    Posts
    16

    Conditional CSS issue

    Hello,

    I want to have alternate padding for IE browsers.

    I have the statement:

    Code:
    	<!--
    	
    	<![if IE]>
    	
    	<style>
    
    	div.blahblah {
    		
    		padding: 5px 13px 10px 9px; 
    		
    		}
    		
    		</style>
    
    		
    
    <![endif]>
    
    -->
    This is enclosed in comments so other browsers don't see it but IE doesn't see it either.

    If I remove the comment tags then IE sees it but then so do all the other browsers.

    What am I doing wrong?

    Thanks

  2. #2
    Join Date
    Jan 2013
    Posts
    2
    First of all remove the sytle tag and put it somewhere else. What are you exactly trying to do? if you have alternate padding for IE browsers then the condition should be <[if IE]>.

    By the way also try <!--[if !IE]> -->. the ! not could be in the wrong place.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles