IE padding problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xoinki
    New Member
    • Apr 2007
    • 110

    IE padding problem

    hi all,
    I have a DIV element for which a table is appended..
    CSS for this div element is..
    Code:
    .optiondiv
    {
        display:block;
        padding: 0px 30px;
        padding-left: 30px;
        padding-right: 30px;
    }
    and CSS for table is
    Code:
    .headeroptions
    {
         background-color: #8CB0D2;
         font: 12px "Trebuchet MS", Verdana, Arial, Helvetica;
         font-weight:bolder;
         width: 100%;
         padding: 0px 30px;
         padding-left: 30px;
         padding-right: 30px;
    }
    The problem is in FF it is displayed correctly with 30px on left and right side..
    but in IE left 30px is there but in right side 30px is not working.. It spans beyond the visual screen with a horizontal scrollbar.

    I couldnt get why this is happening. when we say padding-left and padding-right
    the padding is with respect to current screen right?

    plz help
    Xoinki
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    Try this..

    padding: 0px 30px 30px 30px;

    Comment

    • xoinki
      New Member
      • Apr 2007
      • 110

      #3
      hi,
      thnx for the reply.. I tried this. but still the same result. I am trying to find out padding-left and padding-right is padding with respect to the window screen or with respect to the parent div.. If i can find out this then my problem will be solved.
      anybody knows about this?

      thnx and regards.
      xoinki

      Comment

      • xoinki
        New Member
        • Apr 2007
        • 110

        #4
        hi,
        I found the problem.. the structure is as follows..

        <div1>
        <div2>
        <table>
        here I had specified the padding for div1 and not for div2.. in FF the css for div1 is inherited to div2 and then to table.. but in IE this is not so..

        Thanx and Regards,
        Xoinki

        Comment

        Working...