Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
table 100% width issue
Old 08-18-2006, 04:40 AM table 100% width issue
Experienced Talker

Posts: 33
Trades: 0
The problem comes down to a 100% width table, and 15px padding (from a div) not agreeing in IE. The table takes the full 100% width of the screen and the padding is forced to the right hand side, creating a horizontal scroll bar.

I would like to get rid of the Horizontal Scroll Bar. What are the solutions?

Thankyou
Maedi is offline
Reply With Quote
View Public Profile Visit Maedi's homepage!
 
 
Register now for full access!
Old 08-18-2006, 04:49 AM Re: table 100% width issue
kkcindia's Avatar
Skilled Talker

Posts: 53
Trades: 0
can u show me the page online?
kkcindia is offline
Reply With Quote
View Public Profile Visit kkcindia's homepage!
 
Old 08-18-2006, 04:52 AM Re: table 100% width issue
Experienced Talker

Posts: 33
Trades: 0
Certainly, It only appears in IE:
It's a forums main table causing the conflict between padding that I have put in.

Sourdough.com.au - Forum - Index
Maedi is offline
Reply With Quote
View Public Profile Visit Maedi's homepage!
 
Old 08-18-2006, 08:24 AM Re: table 100% width issue
Novice Talker

Posts: 9
Name: Matt Probert
Trades: 0
Sounds obvious, but have you tried reducing the table width, to say 95%, and enclosing the table within a a centeralising division?

Failing that, are you sure you're not nesting a table within a table? That can cause difficulties when the nested table has it's width set to 100%, same solution. Reduce the width of the nested table slightly, but centeralise it.

Matt
matt probert is offline
Reply With Quote
View Public Profile
 
Old 08-19-2006, 01:45 AM Re: table 100% width issue
Novice Talker

Posts: 11
Trades: 0
You are specifying 100% for one thing and then adding 15px to it, thus creating something that takes up the screen plus 15px.

You might try taking out the padding in your <div>, create another <div> expressing padding (that doesn't specify width), and put it inside your other <div> tag.

You will have to express what you want with some CSS in the header like:

<style type="text/css">

div.pad {
padding:15px;
}

</style>

Then, put it inside the other <div> tag like;

<div>
<div class="pad">
WHATEVER
</div>
</div>
Som Osog is offline
Reply With Quote
View Public Profile
 
Old 08-19-2006, 03:13 PM Re: table 100% width issue
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Better yet.. don't use tables at all

Adding a div just for padding is not a good practice, that's what the padding RULE is for.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-20-2006, 01:50 AM Re: table 100% width issue
Novice Talker

Posts: 11
Trades: 0
You are right LadynRed, it may not be the best idea, but IE has a problem with padding and borders in CSS. If you have specified a width for a div and then include padding and border width, IE adds to the specified width rather than putting the padding and border width within the specified width. The other browsers don't do it this way, so in order to make it work the same in all browsers, my suggestion is the best "hack" I could find to solve the problem.
Som Osog is offline
Reply With Quote
View Public Profile
 
Old 08-21-2006, 01:09 PM Re: table 100% width issue
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Yes, I know that, but adding a div just to MAKE the space is bad semantic markup and should be avoided.

There is excellent info on how to handle IE's busted box model here:
The Box Model Problem
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to table 100% width issue
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30001 seconds with 12 queries