467,077 Members | 1,014 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

IE padding problem

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. }
  8.  
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. }
  11.  
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
Feb 23 '08 #1
  • viewed: 3697
Share:
3 Replies
hsriat
Expert 1GB
Try this..

padding: 0px 30px 30px 30px;
Feb 23 '08 #2
100+
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
Feb 25 '08 #3
100+
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
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@no.spam.com | 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@ipal.net | 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
By using this site, you agree to our Privacy Policy and Terms of Use.