944,052 Members | Top Members by Rank

Ad:
Feb 6th, 2006
0

Firefox and IE padding issue.

Expand Post »
If you take a look at my website in firefox:

and in internet explorer:

you will see the top menu in internet explorer is on the left.

The css code I have used is:

HTML and CSS Syntax (Toggle Plain Text)
  1. .overbodyline
  2. {
  3. background-image:url(/music/images/main.gif);
  4. background-repeat: repeat-y;
  5. {T_TH_COLOR1} solid;
  6. font-size : {T_FONTSIZE2}px;
  7. color : {T_BODY_TEXT};
  8. padding: 0px 0px 0px 40px;
  9. }

and the table code is as follows:

HTML and CSS Syntax (Toggle Plain Text)
  1. <table width="100%" cellspacing="0" border="0" class="overbodyline">
  2. <tr><td><table class="stand" width="700px">random gubbins
  3. </table>
  4. </td></tr>
  5. <table>

For some reason the rest of the padding is fine. I've attached the whole file if you need to check out anything else.
Attached Files
File Type: txt overall_header.txt (13.6 KB, 118 views)
Last edited by tgreer; Feb 6th, 2006 at 11:55 am. Reason: Missing code tags again...
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

In general, CSS spacing issues can be resolved by specifying both the "padding" and "margin" properties of all the affected elements.

Tables have their own properties... try setting "cellpadding".
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

Ah taking of cellpadding - I've tried that and it works but I've found no way of specifying that it only pads the left hand side... any ideas if theres a way to define it?
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

So theres no way of defining the cellpadding attribute to pad from the left. So back to square one. I wonder why this table is causing trouble when the rest are fine?
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

CSS attributes "cascade", from least-specific to most-specific. You are also mixing inline attributes with CSS class definitions.

In any given TD for your table, you'll get a "combined" or "derived" style based on the inline attributes, the "overbodyline" class, and the "stand" class. Any attributes you've left undefined (such as "margin") will get whatever default the browser uses.

Is the data in your table really tabular? Are you actually presenting a "table" of data? If not, then consider using DIVs, SPANs, and CSS to control appearance and flow. It will be much simpler to troubleshoot these issues if you didn't mix tables and CSS.
Last edited by tgreer; Feb 6th, 2006 at 5:40 pm.
Team Colleague
Reputation Points: 227
Solved Threads: 37
Made Her Cry
tgreer is offline Offline
1,697 posts
since Dec 2004
Feb 6th, 2006
0

Re: Firefox and IE padding issue.

I restructured my tables and got it fixed... yay!
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
MrScruff is offline Offline
89 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: dreamweaver button help
Next Thread in HTML and CSS Forum Timeline: Dynamic iframe height ?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC