GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-Jul-2003, 03:25
zuzupus zuzupus is offline
Junior Member
 
Join Date: Jul 2003
Posts: 70
zuzupus is an unknown quantity at this point

cols width problem


hi,

I got problem regardign col width i am having 11 cols in table in which first and second col width looks irregular but rest looks perfet

PHP Code:

<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 style="width : 250px;" name="rsTable" id=rsTable cols=11>
 <col style="width : 125px;" />
 <col style="width : 125px;" />

<tr>
<th>Datum</th>
<th>Von</th>
<th>Bis</th>
<th>Kunde</th>
<th>Projekt</th>
<th>H-Vorgang</th>
<th>U-Vorgang</th>
<th>Text</th>
<th>IST</th>
<th>Soll</th>
<th>Status</th>
<th>&nbsp;</th>
</tr>


<tr>
<input size="1" type="hidden" name="nr" value="<?= $pk ?>"> 
<td nowrap align="center">
<input size="7" type="text" name="datum" value="<?=$D?> <?= date("d.m.y") ?>">
<a href="javascript:show_calendar('tstest.datum');"><img src="../img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a></td>

<td nowrap align="center">
<select name="von">
//php code to get values </select>
<input type="button" name="now" size="1" value=">" onclick="inputTime();calculateIst()"></td>
---------
---------//other fields
---------
</tr>

<tr>

<td></td>             //as this one is for printing in form using php
<td></td>
</tr>


</table> 



if anybody helps me out will really be appreciable what went wrong that 1st and 2nd cols alignment not looks good rest looks perfect

but when i remove table style:width=250px then it looks perfect but lot of spaces at end

thanks in advance
Attached Images
File Type: jpg space.jpg (46.8 KB, 61 views)
  #2  
Old 23-Jul-2003, 05:18
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough

Re: cols width problem


I don't know why you're using the <col> tags... plus, I've already given you an example in this thread how you can control the width of a cell more tightly.

So, if you ask me, a simpler solution is to just use CSS and re-write the code like this:
PHP Code:

<td style="table-layout:fixed; width:125px; text-align:center;">
  <input size="7" type="text" name="datum" value="<?=$D?> <?= date("d.m.y") ?>">
<a href="java script:show_calendar('tstest.datum');"><img src="../img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
</td> 


  #3  
Old 23-Jul-2003, 06:18
zuzupus zuzupus is offline
Junior Member
 
Join Date: Jul 2003
Posts: 70
zuzupus is an unknown quantity at this point

Re: Re: cols width problem


sorry for ur trouble as i already tried with ur posted code but unfortunately what went wrong i dont understand the form becomes more squeezed after save button there r lot of space and all fields r not aligned well

Code:
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 style="width:150px" name="rsTable" id=rsTable cols=11> <tr bgcolor="#cccccc"> <th nowrap="true">>Datum</th> <th nowrap="true">Von</th> <th nowrap="true">Bis</th> <th nowrap="true">Kunde</th> <th nowrap="true">Projekt</th> <th nowrap="true">H-Vorgang</th> <th nowrap="true">U-Vorgang</th> <th nowrap="true">Text</th> <th nowrap="true">IST</th> <th nowrap="true">Soll</th> <th nowrap="true">Status</th> <th nowrap="true">&nbsp;</th> </tr> <tr> <input size="1" type="hidden" name="nr" value="<?= $pk ?>"> <td align="center"> <input size="7" type="text" name="datum" value="<?=$D?> <?= date("d.m.y") ?>"> <a href="javascript:show_calendar('tstest.datum');"><img src="../img/cal.gif" width="16" height="16" border="0" alt="Click Here to Pick up the date"></a> </td> <td align="center"> <select name="von"> </select> <input type="button" name="now" > </td> <td align="center"> <select name="bis" > </select> <input type="button" name="now" size="1" > </td> <td align="center"> <select name="kunde" > </select> </td> <td align="center"> <select name="projekt"> </select> </td> <td align="center"> <select name="hvorgang" > </select> </td> <td align="center"> <select name="uvorgang"> </select> </td> <td align="center"> <textarea name="text" WRAP=SOFT class="mybar" id="tar" cols="20" rows="1" onfocus="tarea();" onblur="tarea();" title=""></textarea> <img src="../img/edit.gif" onclick="window.open('thewindow.html','newWin','width=150,height=130,top=525,left=800,dependent=yes,alwaysRaised=yes,resizable=1')" width="16" height="16" border="0" alt="Edit Text"></a> </td> <td align="center"><input size="1" type="text" value="00:00" name="ist" readonly></td> <td align="center"><input size="1" type="text" name="soll" value="<?= $getrow["soll"] ?>" readonly></td> <td align="center"> <select name="status"> </select> </td> <td align="center"><input type="button" value="Save" name="Save" border="1" onclick="go();"></td> </tr> <tr bgcolor="#FACB84"> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["datum"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["von"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["bis"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["kunde"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["projekt"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["hvorgang"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["uvorgang"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?echo $output;?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["ist"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["soll"] ?></td> <td style="table-layout:fixed; width:150px; text-align:center;"><?= $line["status"] ?></td> </tr> </table>

i dont no what went wrong may be this code is painful for ur eyes sorry for that

thanks in advance
  #4  
Old 23-Jul-2003, 06:37
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Try changing this:
HTML Code:
<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 style="width:150px" name="rsTable" id=rsTable cols=11>
to
HTML Code:
<table border="1" cellspacing="0" cellpadding="0" style="width:100%" name="rsTable" id="rsTable" cols="11">

If your code is just HTML, use

Code:
[html] ...some HTML code.... [/html]

So the codes are coloured according to the html elements used.
  #5  
Old 23-Jul-2003, 06:48
zuzupus zuzupus is offline
Junior Member
 
Join Date: Jul 2003
Posts: 70
zuzupus is an unknown quantity at this point
sorry stil its not working all colored codes r already in <html> tags then back to same problem stll some spaces in all fields i just want to avoid lil space between 2 field values
when i sue soemthing liek this somewhat it is better

<th width="70">Datum</th>
<th width="71">Von</th>
<th width="71">Bis</th>
<th width="54">Kunde</th>
<th width="71">Projekt</th>
<th width="94">H-Vorgang</th>
<th width="93">U-Vorgang</th>
<th width="150">Text</th>
<th width="40">IST</th>
<th width="40">Soll</th>
<th width="53">Status</th>
<th width="66">&nbsp;</th>


thanks
 
 

Recent GIDBlogFlickr uploads of IA pictures by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with php5 cgi installation fab13 Apache Web Server Forum 3 19-Nov-2003 09:11
unwanted scrollbar problem kelly001 Web Design Forum 3 24-Oct-2003 10:44
Geforce FX 5600 Ultra problem jenovasbirth Computer Hardware Forum 1 04-Oct-2003 17:00
textarea width problem zuzupus Web Design Forum 2 23-Jul-2003 03:06
HELP!: find window width? Center a <div>? Kingherc Web Design Forum 2 06-Jul-2003 05:25

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 17:34.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.