Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    New Coder
    Join Date
    Apr 2008
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    IE no / Firefox yes

    I am pretty new to CSS and wondering if someone
    could explain why the following code works in firefox
    but not in Internet Explorer...

    Code:
    <style>
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>

  • #2
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Code:
    <style type="text/css">
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    Drew

  • #3
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts
    Or, if you have an external CSS file, remove the <style></style> tags. They are not needed as the encoding is CASCADING STYLE SHEET (.css). They also make a difference to
    padding-left: 30px;
    and
    margin-top: 2em;
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #4
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    They also make a difference to
    padding-left: 30px;
    and
    margin-top: 2em;
    ..........what are you talking about....?

    Drew

  • #5
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts
    It correctly positions them.
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #6
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Quote Originally Posted by BabyJack View Post
    It correctly positions them.
    Again what are you talking about? Correctly positions what? Please elaborate as to what you are trying to say and how it relates to the OP

    Drew

  • #7
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts
    It correctly positions the
    <p class="">
    <div id="">

    thingies to how many EM, PX, IN, CM, MM etc.. Dont know how I can explain it more!
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #8
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    thingies
    Is that the term?

    This has nothing to do with the OP, why dont you quit while your ahead.

  • #9
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts
    Its not the term, couldnt think of the word.

    It does have something to relate to the OP. Im saying that <style></style isnt needed in CSS external files.
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #10
    Regular Coder FWDrew's Avatar
    Join Date
    Apr 2008
    Location
    Missouri
    Posts
    380
    Thanks
    38
    Thanked 45 Times in 43 Posts
    Quote Originally Posted by BabyJack View Post
    Its not the term, couldnt think of the word.

    It does have something to relate to the OP. Im saying that <style></style isnt needed in CSS external files.
    Using the tags would make one assume that it was not a .css file. However, I guess pointing out the obious is somewhat relevant so I see your point for that.

    All that gibberish about padding and the <p =""> tags had nothing to do with the OP and made no sense.

    Im done with this thread, it was answered long ago.

    Drew

  • #11
    Regular Coder BabyJack's Avatar
    Join Date
    Apr 2008
    Location
    Somewhere.
    Posts
    602
    Thanks
    43
    Thanked 6 Times in 6 Posts
    Ok, I knew what I meant - just that I can never think of the right words.
    Enlightenment in Coding
    Validate before Posting | Google is your friend for PC Problems | Make sure you have a doctype

  • #12
    New Coder
    Join Date
    Apr 2008
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I appreciate all the help,
    however, I tried:
    Code:
    <style type="text/css">
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    and still doesnt work in IE...
    ???

  • #13
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Please post a link to your site or post the rest of your html. CSS without html is useless. You've given us just about nothing to work with. Help us help you.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #14
    New Coder
    Join Date
    Apr 2008
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <style type="text/css">
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    Code:
    <table id="table1" width=700>
    <tr>
    <td>
    </td>
    Why does this work in Firefox but not IE?
    </tr>
    </table>

  • #15
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,302
    Thanks
    28
    Thanked 276 Times in 270 Posts
    Quote Originally Posted by Lambneck View Post
    I am pretty new to CSS and wondering if someone
    could explain why the following code works in firefox
    but not in Internet Explorer...

    Code:
    <style>
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    Internet Explorer doesn’t support the application of padding to table elements up to, at least, version 7.

    Just FYI, you could have shortened this code considerably as shown below.

    Code:
    <style type="text/css">
    	#table1 { padding: 50px 0 50px 100px; }
    </style>
    Quote Originally Posted by FWDrew View Post
    Code:
    <style type="text/css">
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    While the type attribute is required per the HTML 4.01 specification and XHTML DTDs, this isn’t the source of this cited issue.

    Quote Originally Posted by Lambneck View Post
    Code:
    <style type="text/css">
    #table1 {padding-top: 50px;
        	     padding-right: 0px;
                 padding-bottom: 50px;
        	     padding-left: 100px;
    }
    </style>
    Code:
    <table id="table1" width=700>
    <tr>
    <td>
    </td>
    Why does this work in Firefox but not IE?
    </tr>
    </table>
    Please use comment tags (e.g., <!-- Why does this work in Firefox but not IE? -->) or move comments outside of your code when providing said code since we can’t know if that’s literally part of the code or just something to help explain your issue.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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