Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-11-2012, 02:31 PM   PM User | #1
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,177
Thanks: 214
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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]-->

Last edited by durangod; 12-11-2012 at 02:53 PM..
durangod is offline   Reply With Quote
Old 12-11-2012, 02:52 PM   PM User | #2
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,177
Thanks: 214
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
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..

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 is offline   Reply With Quote
Old 12-11-2012, 03:39 PM   PM User | #3
tracknut
Regular Coder

 
Join Date: Aug 2006
Posts: 891
Thanks: 4
Thanked 205 Times in 204 Posts
tracknut is an unknown quantity at this point
Aside from the IE thing, deprecated stuff, ec, this code:
Code:
width="150px"
isn't correct. The correct syntax is:
Code:
width="150"
Dave
tracknut is offline   Reply With Quote
Users who have thanked tracknut for this post:
durangod (12-11-2012)
Old 12-11-2012, 05:11 PM   PM User | #4
durangod
Senior Coder

 
Join Date: Nov 2010
Posts: 1,177
Thanks: 214
Thanked 31 Times in 30 Posts
durangod is on a distinguished road
oops my bad thanks, old habbits die hard lol..
durangod is offline   Reply With Quote
Old 12-11-2012, 06:05 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,447
Thanks: 0
Thanked 496 Times in 488 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:17 AM.


Advertisement
Log in to turn off these ads.