SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I set table width in Css and php??

    Hello,
    I have problem with tables in the application Iam developing.
    The tables are looking ok in two browsers( Opera and Mozilla) But in Micro soft Internet explorer the tables and the content are not coming out properly.
    How can I solve this problem??
    Your help will be highly appreciated.

  2. #2
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no universal IE table problem. Try telling us what the problem is, maybe give a demonstration and we'll have a chance at telling you.

    It's also unlikely to be a PHP issue, as PHP will be giving the same HTML to all browsers.

    You can set width with CSS like so:
    Code HTML:
    <table style="width: 300px;">

    (or use a class/ID to do the same)

  3. #3
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is the phpcode with tables that are overlapping

    <!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>
    <title></title>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="zrastyles.css" />
    <style type="text/css">
    <!--
    .style15 {color: #FFFFFF}
    -->
    </style>
    </head>

    <body>

    <div align="center">
    <table width="80&#37;" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td colspan="3"><div align="center"></div></td>
    </tr>
    <tr>
    <td colspan="3" align="center" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td bgcolor="#181C5A"width="17" rowspan="3" align="left" valign="top"><p class="style15">This cell is overlapping in Microsoft Internet Exploer </p>
    <p class="style15">OVERLAPPING</p></td>
    <td width="592" height="85" colspan="2" align="left" valign="top">&nbsp; </td>
    </tr>
    <tr>
    <td height="85" colspan="2" align="left" valign="top">&nbsp;</td>
    </tr>
    <tr>
    <td colspan="2" align="left" valign="top">&nbsp;</td>
    </tr>

    <tr>
    <td colspan="3" align="left" valign="top"><div align="center"></div></td>
    </tr>
    </table>
    </div>
    </body>
    </html>

  4. #4
    SitePoint Evangelist barbara1712's Avatar
    Join Date
    Apr 2007
    Location
    India
    Posts
    509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try to made this change from 17 to 17&#37;.
    <td bgcolor="#181C5A"width="17%" rowspan="3" align="left" valign="top"><p class="style15">This cell is overlapping in Microsoft Internet Exploer </p>
    Barbara


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
  •