+ Reply to Thread
Results 1 to 5 of 5




  

Thread: Weird but common table problem

      
  1. #1
    Jedi Master Paramiliar is on a distinguished road Paramiliar's Avatar
    Join Date
    July 24, 2007
    Location
    West Midlands
    Posts
    105
    Rep Power
    5
    Feedback Score
    0

    Question Weird but common table problem

    Hey guys need some help on this, I have a table that exceeds the width of the page, this table is contained in a divider that puts borders and other things around the table, however if the table is wider than the page it overlaps the divider and the divider does not resize beyond the width of the page.

    For an example of this see the code below, I need to have the divider to be ALWAYS 100% of the page and if the table is greater than 100% the divider should increase as well.

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style>
    html, body {
    	width:100%;
    	height:100%;
    }
    #testdiv {
    	background-color:#eeeeee;
    	margin:0 auto;
    }
    #testdiv2 {
    	padding:5px;
    }
    </style>
    </head>
     
    <body>
    <div id="testdiv">
    <div id="testdiv2">
    <table cellpadding="2" cellspacing="2" width="110%" bgcolor="#dddddd">
    <tr><td bgcolor="#ffffff">&nbsp;</td></tr></table>
    </div>
    </div>
    </body>
    </html>
    Matthew Bagley
    Paramiliar Design Studios
    IT Consultant | Website Design | Website Development

  2. #2
    Jedi Master Paramiliar is on a distinguished road Paramiliar's Avatar
    Join Date
    July 24, 2007
    Location
    West Midlands
    Posts
    105
    Rep Power
    5
    Feedback Score
    0

    Default Re: Weird but common table problem

    managed to solve this one

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style>
    #testdiv {
    	background-color:#eeeeee;
    	display:-moz-inline-stack;
    	padding:0 10px;
    	display:inline-block;
    	zoom:1;
    	*display:inline;
    }
    </style>
    </head>
     
    <body>
    <div id="testdiv">
    <table cellpadding="2" cellspacing="2" width="100%" bgcolor="#dddddd">
    <tr>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    	<td bgcolor="#ffffff">aaaa</td>
    	<td bgcolor="#ffffff">bbbb</td>
    	<td bgcolor="#ffffff">cccc</td>
    	<td bgcolor="#ffffff">dddd</td>
    	<td bgcolor="#ffffff">eeee</td>
    </tr>
    </table><br />&nbsp;aaaaa
    </div>
    </body>
    </html>
    Matthew Bagley
    Paramiliar Design Studios
    IT Consultant | Website Design | Website Development

  3. #3
    I'm New! sunlista is on a distinguished road
    Join Date
    May 24, 2011
    Posts
    4
    Rep Power
    0
    Feedback Score
    0

    Default Re: Weird but common table problem

    try to make it position:absolute.that should fix the problem.

  4. #4
    I'm New! centerpoint is on a distinguished road
    Join Date
    May 24, 2011
    Posts
    5
    Rep Power
    0
    Feedback Score
    0

    Default Re: Weird but common table problem

    add this to your css
    table{
    position:absolute;
    margin:0 auto;
    width:100%;
    }
    hope it works.

  5. #5
    Jedi Master mahesh10 is on a distinguished road
    Join Date
    June 17, 2010
    Location
    USA
    Posts
    239
    Rep Power
    2
    Feedback Score
    0

    Default Re: Weird but common table problem

    Hello ,
    please make below code width as 100% or please do mention in the px

    width="110%

    i hope this would solve your problem.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. List of common forum user names
    By hostabove in forum Forum Management
    Replies: 12
    Last Post: Sep 15th, 2011, 9:48 am
  2. I need HELP with this table
    By stefanie in forum HTML & Website Design
    Replies: 10
    Last Post: Dec 13th, 2008, 1:11 pm
  3. Mobile SMS are not common in USA?
    By Jani in forum Forum Lounge
    Replies: 11
    Last Post: Mar 5th, 2008, 2:23 am
  4. Table disturbing in IE, Please help
    By Jani in forum HTML & Website Design
    Replies: 3
    Last Post: Jan 13th, 2008, 8:32 am
  5. Common 70's Prank = Sexual Offender?
    By dgridley in forum World News
    Replies: 36
    Last Post: Oct 31st, 2007, 11:38 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads