By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,677 Members | 1,798 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,677 IT Pros & Developers. It's quick & easy.

IE padding problem

P: 110
hi all,
I have a DIV element for which a table is appended..
CSS for this div element is..
Expand|Select|Wrap|Line Numbers
  1. .optiondiv
  2. {
  3.     display:block;
  4.     padding: 0px 30px;
  5.     padding-left: 30px;
  6.     padding-right: 30px;
  7. }
and CSS for table is
Expand|Select|Wrap|Line Numbers
  1. .headeroptions
  2. {
  3.      background-color: #8CB0D2;
  4.      font: 12px "Trebuchet MS", Verdana, Arial, Helvetica;
  5.      font-weight:bolder;
  6.      width: 100%;
  7.      padding: 0px 30px;
  8.      padding-left: 30px;
  9.      padding-right: 30px;
  10. }
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
Feb 23 '08 #1
Share this Question
Share on Google+
3 Replies

Expert 100+
P: 1,654
Try this..

padding: 0px 30px 30px 30px;
Feb 23 '08 #2

P: 110
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.
Feb 25 '08 #3

P: 110
I found the problem.. the structure is as follows..

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,
Feb 25 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.