472,139 Members | 1,364 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

IE padding problem

110 100+
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
3 3821
1,654 Expert 1GB
Try this..

padding: 0px 30px 30px 30px;
Feb 23 '08 #2
110 100+
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
110 100+
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.

Similar topics

1 post views Thread by delerious | last post: by
2 posts views Thread by Knoxy | last post: by
7 posts views Thread by Gustaf Liljegren | last post: by
4 posts views Thread by Wilhelm Kutting | last post: by
2 posts views Thread by Remi Villatel | last post: by
36 posts views Thread by phil-news-nospam | last post: by
10 posts views Thread by Alan Silver | last post: by
5 posts views Thread by Tom | last post: by
5 posts views Thread by Mike | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.