HTML - Ms Word & Table Column Width
The following piece of code delivers a table with fixed width 666px and appr. 200px 466px wide columns, when opened within IE. Long text fits into the columns, long strings break at the border.
When opening up within MS Word, the column width seem to ignore the styles. Does anybody know alternative commands delivering the same result in MS Word? Thanks, Andreas <table style="width: 666px; table-layout:fixed; word-wrap: break-word;" cellspacing="0"> <col width="30%"> <col width="70%"> <tr> <td>Floating Rate Payer Calculation Amount:</td> <td>|TRADE_CURRENCY| |CD_NOTIONAL|</td> </tr> </table> Similar TutorialsHi, I am new in web designing. I need your guidance. I want to break a word if it is longer than table width. May be I am not good at Engilsh. So I'll explain it using example. Following is my code. Code: <html> <body> <table align="justify" width="100" border"3"> <tr> <td> TE-sdf-sdf-hkjd </td> </tr> </table> </body> </html> As here you can see the word "TE-sdf-sdf-hkjd" length is more than 100px. So the width of table becomes more than 100px. I want to break the word and fix the width of table to 100px. How can I achieve that? Waiting for your reply. Hi! I've been trying to figure out why columns in my HTML-table get weird widths. ie. this code: HTML Code: <table width="950" cellpadding="0" cellspacing="0"> <tr> <td colspan="5"> column1 </td> <td colspan="5"> column2 </td> </tr> <tr> <td colspan="5"> <input type="text" value="column3" maxlength="20" style="width:165px;" /> </td> <td colspan="5"> column4 </td> </tr> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> <td>5</td> <td>6</td> <td>7</td> <td>8</td> <td>9</td> <td>10</td> </tr> </table> gives me the result: Is there any way I can fix this so each of the columns get's equal size? Preferably without actually having to have to set the width on each of the bottom columns. If not, could anyone explain to me why it's acting this way? Thanks. Hi, I have the following problem i'm trying to solve with HTML: I have a simple table with 3 columns. I want the table to have a 100% width of the screen. Furthermore the center column must ALWAYS have a width of 1000. The left and right column should just be there too fill the gaps up if you have a wider screen than 1000. Setting these left/right columns to width "100%" doesn't work because than it would just make the left column fill up the space and the right column will have a width of 0. How can I solve this? Some example could would be highly appreciated Thanks, betonboor I don't know if this is supposed to be posted here or in the css forum - so correct me if I'm doing it wrong. I'm making a table with a variable number of colums. The first column should be allowed to have a width of 30 % if it is needed by the text, but less if it is not needed. (This can style="max-width:30%" do for me). The rest of the columns can use the space that the first columns doesn't use, but shouldn't be able to force the first column to be smaller. If I use max-width the first column might be smaller than 30% because of the rest of the columns forces it to be so, and if I use width=30% the width will be 30% even if the text in the first column doesn't need 30%. Can anyone help me? This could be an HTML or CSS problem, but I can't figure out what's causing this and it's driving me nuts! The left column on my website will not stay a fixed width of 175px in IE 8. That seems to be the only browser having a problem. Here's the link: http://www.jrsart.net/testarea/paull...cientists.html I've linked the page that has it the worst, but if you visit the other pages and keep an eye on the left column's border, you'll see it keeps moving. Please help! I'm rapidly running out of time to fix this issue, so any advice would be greatly appreciated! Hey all, http://www.lindesigns.us/rma/rmaonline.php If you go to that site on Firefox, the "Return Code #" expands. But if you use IE, you'll see that it doesn't. I could add a fix in there for the fields if they were static, but if you see my javascript, they are dynamically loading fields. This "class":"wide" is not working: Code: invoiceInput.appendChild(createElement("input", {"type":"text", "name":"invoice[]", "size":"8", "class":"wide;"})); I am using a script I found on a jQuery board (http://jsbin.com/acado/6), and it works for them, but not for me because my syntax is probably wrong. And they also are just using 1 field and not near-unlimited dynamically loading fields like I am. How would I add in a fix to have the browser 'only' use the expansion if the user is using IE6 or IE7? I searched on the boards but couldn't find the solution to this problem. Thanks in advance! Hi: I would like to present to my users a 3-column table of 'House for Sale' advertisements. This is not a commercial venture but will only be for the use of my Senior Mobile Home Park residents. Each of the three columns should contain x number of rows with each column cell containing a tiny pic (from a house.jpg file) and underneath the pic would be a few general details of the price, address, agent selling, etc. The .pic would be clickable and would then bring up a more enlarged picture of the house and complete details of the house for sale. My first puzzle is how to make this list of rows of advertisements *variable*. I guess I have to 'build' the page in my server according to how many ads are currently active ?? Any first thoughts are welcome. Thanks, -Mel Smith hi i am displaying the data retrived from the database in table format. say using query select . col1 col2 col3 col4 12 15 15 13 15 16 the data displayed in col1,col2,col3 are retrieved from the database. now the problem is now i have to compute value for col4 (i.e col4= (15+15)/4) using the values in col2 ,col3. how to perform this. i am using sql as backend and jsp for front end. please send some similar examples or working code for this or any suggestions are appreciated. Thanks and regards Manjunath Hey guys, Okay so i have a question over a table that I am generating with data from a database. The way i have my table set up is like this: Recipe Name-----Prep Time-----Total Time-----Rating ========================================= some data here 12 mins 20 mins 4.5 some data here 12 mins 20 mins 4.5 some data here 12 mins 20 mins 4.5 some data here 12 mins 20 mins 4.5 So what i want to know is if I could make the Column Header (RECIPE NAME) into a link that way the user can click it and it would sort the recipe names in ascending order. When i open the page i am already displaying all the data form the database in this table. but i want to allow the user to be able to sort the recipe names. So i would have to i guess (REFRESH) the page automatically?? I already have teh code to sort my data, what I need to know is how exactly to go about making the column header into a link to SORT and then refresh the page Here is my code I currently have used to create the TABLE and populate it using a while loop to send the data from the DB into the table: <table border="2" width ="500"> <tr> <th>Recipe Name</th> <th>Prep Time</th> <th>Total Time</th> <th>Rating</th> </tr> <!--While statement used to pass data from DB into tables --> <? while( $row = mysql_fetch_array( $result ) ) { ?> <tr> <td><a href="ShowRecipe.php?id=<?=$row['id'] ?>"><?=$row['name'] ?></a></td> <td><?=$row['preptime']?> mins</td> <td><?=$row['totaltime']?> mins</td> <td><?=$row['rating']?></td> </tr> <? } ?> </table> Hi all, I want my table to have 100% of the screen width. But when the text inside is to big, the table is wider than the screen. My table info is: <table border='1' bordercolor='darkgrey' width='100%' cellpadding='3' cellspacing='0'> I also want, that all 8 columns have the same width according to 100% from the table. What can I do? Mfg, DerTobi Hi, ive been trying to solve the image in the table but couldnt get it right.. I need help from you guys.. kindly see the attached image for the error: and this is the HTML code HTML Code: <table cellpadding="0" cellspacing="0" border="0" width="600px" bgcolor="#FFFFFF"> <tr> <td width="34"> <img src="{/document/config/static-image-url}3_1_3.gif" alt="" border="0" width="34" height="116" /> </td> <td> <table cellpadding="0" cellspacing="0" border="0" width="268" bgcolor="#FFFFFF" height="116"> <tr> <td align="left" width="268" bgcolor="#FFFFFF"> <span class="price1" style="color:#000000;font-size:12px;font-family:Arial;font-weight:bold"> <xsl:call-template name="fixLines"> <xsl:with-param name="inText" select="/document/page/field-set/field[tagname = 'text_15']/value" /> </xsl:call-template> </span> </td> </tr> <tr> <td align="left" width="268" bgcolor="#FFFFFF"> <span class="price1" style="color:#000000;font-size:12px;font-family:Arial"> <xsl:call-template name="fixLines"> <xsl:with-param name="inText" select="/document/page/field-set/field[tagname = 'text_16']/value" /> </xsl:call-template> </span> </td> </tr> </table> </td> <!-- the error image which needs to be aligned--> <td> <img src="{/document/config/static-image-url}3_1_5.gif" alt="" border="0" width="61" height="116" /> </td> <!--END OF the error image which needs to be aligned--> <td align="left" width="290" bgcolor="#FFFFFF" valign="top"> <span class="price1" style="color:#000000;font-size:12px;font-family:Arial;font-weight:bold"> <xsl:call-template name="fixLines"> <xsl:with-param name="inText" select="/document/page/field-set/field[tagname = 'text_17']/value" /> </xsl:call-template> </span> </td> <td> <img src="{/document/config/static-image-url}3_0.gif" alt="" border="0" width="100" height="116" /> </td> <td> <img src="{/document/config/static-image-url}3_1_4.gif" alt="" border="0" width="32" height="116" /> </td> </tr> </table> Hope to get a response asap.. thank you guys, Regards, Ed Please check my new website at http://www.lombrozo.co.uk the main part of each page is a table with width set to 100%, but as you can see, it doesn't quite fill the width of the browser, you can see this by the thick grey line on the right side... Any ideas? any help much appreciated. Thanks, Simon. Hi, I'm having an issue with a table that I could use some help with. Code: <table width="10"> <tr> <td width="10">ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()_+/*-+</td> </tr> </table> As you can see, the letters contained in the <td> when printed are much wider than 10px, but because there are no spaces between the text, it stretches past 10px. I'm trying to find a way so that even though there are no spaces dividing the text, the text still stays within 10px width and doesn't stretch the table. I've tried fixed width and max-width, neither worked. Any suggestions? Not sure if I worded that right. But I have a 3 column table with three rows. And I want a row with no columns at the top that is the full width, so I can put a title in there. how do I do that? Here is my current title. Thank you. Code: <table id="box-table-b"> <thead> <tr> <th width="175" scope="col">Website</th> <th width="69" scope="col">Lowest <br /> Price</th> <th width="50" scope="col">BUY</th> </tr> </thead> <tbody> <tr> <td>xxxx</td> <td>x</td> <td><a href="#">Here</a></td> </tr> <tr> <td>xxxxx</td> <td>x</td> <td><a href="#">Here</a></td> </tr> </tbody> </table> I want to hide a table column when a window gets too a certain width. I've clocked onto the media tags, and I've used them to re-structure my navigation bar and I know the media tags work beautifully, I just need to remove a column from a table, the last column too be exact, using just HTML. Alternatively, If I can't remove it how can I make it seem like it's gone? I've tried setting the column width too 0px but that doesn't work. there's an image inside the column though, and I reckon that might be what's messing this up. Any suggestions guys? Hi, I am new to web design and am trying to design company website without using a site builder. I have built up my container with 3 boxes inside. In the largest I want text on the right and a 1 column 2 row table on the right - to be adjacent to each other but I can't get it to work. I don't want the text to wrap around the table. Please help. I need a three column table in which the center column will have multiple rows, the number will vary. For exampe, this works. I need a third column that will look like the first, just one row corresponding to the seven rows in the second column. Code: <table border=1> <tbody> <tr><td rowspan=8>Dry skin</td></tr> <tr><td>46.0 </td></tr> <tr><td>9.0 </td></tr> <tr><td>35.3 </td></tr> <tr><td>12.5 </td></tr> <tr><td>20.8 </td></tr> <tr><td>27.0 </td></tr> <tr><td>4.0 </td></tr> </tbody> </table> If I do this Code: <table border=1> <tbody> <tr><td rowspan=8>Dry skin</td></tr> <tr><td>46.0 </td></tr> <tr><td>9.0 </td></tr> <tr><td>35.3 </td></tr> <tr><td>12.5 </td></tr> <tr><td>20.8 </td></tr> <tr><td>27.0 </td></tr> <tr><td>4.0 </td></tr> <tr><td>third column, same row? </td></tr> </tbody> </table> another row is started. I just want third column that has one row corresponding, correlated with the seven rows in the second column. I don't know how to do that. I want to dynamically hide column in table. There's many working examples on the web, such as http://www.ahfb2000.com/webmaster_he...ead.php?t=3356 But I lack one feature. When I hide column (all cells in column) via style.visibility="hidden", the remaining column (cells) doesn't adjust its width. I would like to somewhat make the table adjust all cells widths (push together), as if the hidden column (cells) wasn't there at all. Is it possible ? Thanks. Hello all! I wanted to ask if there is a way to specify certain width sizes for table cells in a table. The thing is that I have a table in one webpage that, if I leave the width of the TD cells unspecified, I usually end up with some cells being very wide because the text that is written inside them is very big and does not roll up automatically and other cells shrink and become very small in order for the total table not to lose its specified length. Can I set a specific width for the cell that gets filled with many words so that the contents of this cell will wrap and not extend so much? Thank you! |