CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Resolved applying the if IE conditional statement (http://www.codingforums.com/showthread.php?t=283975)

durangod 12-11-2012 02:31 PM

applying the if IE conditional statement
 
Hi i have a problem where FF displays different on doing padding than does IE so i think i need to do the if IE statement.

I the past i have used the if ie inside of the head before on a html, file but this is going inside a php file.



Code:

  <!-- for ie this works -->
 <td width="150px" style="padding:30px 0px 0px 30px;">

  <!-- for FF this works -->

<td width="150px" style="padding:20px 0px 0px 20px;">

<!-- and so i need to apply this but not sure of the proper placement,
do i just put it as is anywhere in the html or does it need to go inside
a style anchor or do i need to wrap a style with this.  Just not sure.  -->

<!--[if IE]>

<![endif]-->


thanks


i just tried this no good, the content is all over the place lol


Code:


        <!--[if IE]>
            <td width="150px" style="padding:30px 0px 0px 30px;">
          <![endif]-->

          <!--[if !IE]>
            <td width="150px" style="padding:20px 0px 0px 20px;">
          <![endif]-->


durangod 12-11-2012 02:52 PM

Got it whoo hooo my if IE was ok, but my IF NOT above was all wrong in syntax. Had no idea has to add the extra wrapping there.
This below works.. :thumbsup:

Code:


          <!--[if IE]>
            <td width="150px" style="padding:30px 0px 0px 30px;">
            <![endif]-->

            <!--[if !IE]> -->
            <td width="150px" style="padding:20px 0px 0px 20px;">               
            <!-- <![endif]-->


tracknut 12-11-2012 03:39 PM

Aside from the IE thing, deprecated stuff, ec, this code:
Code:

width="150px"
isn't correct. The correct syntax is:
Code:

width="150"
Dave

durangod 12-11-2012 05:11 PM

oops my bad thanks, old habbits die hard lol..

felgall 12-11-2012 06:05 PM

IE uses the same padding as all the other browsers when in standards mode - so if it is not then you either don't have a doctype or IE isn't recognising it properly. No browser specific coding is ever required for padding when your page is correctly coded.


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.