|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
IE table render issue
the following code works perfect in firefox.. but not in IE.
IE stretches the width way out of proportion. i've tried all sorts of tweaks to the width settings but to no avail. any suggestions are much appreciated. Code:
Public Sub ThemeMenuTop ' table top (5 colums, 2 corner columns and 3 for across the top response.write "<table width='98%' align='center' cellpadding='0' cellspacing='0'>" & CRLF response.write "<tr><td align='left' valign='top' class='borderedge'>" response.write "<img src='" & sBBSTemplateImagesRoot & "/theme/menu/top-left-corner.gif'>" response.write "</td>" & CRLF response.write "<td align='left' valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-top-left.gif'> </td>" & CRLF response.write "<td width='1%' align='center' valign='top' class='borderedge'><img src='" & sBBSTemplateImagesRoot & "/theme/menu/table-top-middle.gif'></td>" & CRLF response.write "<td align='right' valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-top-right.gif'> </td>" & CRLF response.write "<td align='right' valign='top' class='borderedge'>" response.write "<img src='" & sBBSTemplateImagesRoot & "/theme/menu/top-right-corner.gif'>" response.write "</td></tr>" & CRLF ' Table left side response.write "<tr><td align='left' valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-left-side.gif' style='background-repeat:repeat-y;'> </td>" & CRLF response.write "<td width='100%' colspan='3'>" End Sub Public Sub ThemeMenuBottom response.write "</td>" response.write "<td valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-right-side.gif' style='background-repeat:repeat-y;'> </td></tr>" & CRLF response.write "<tr><td align='left' valign='bottom' class='borderedge'>" response.write "<img src='" & sBBSTemplateImagesRoot & "/theme/menu/bottom-left-corner.gif'>" response.write "</td>" & CRLF response.write "<td align='left' valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-bottom-left.gif'> </td>" & CRLF response.write "<td width='1%' align='center' valign='top' class='borderedge'><img src='" & sBBSTemplateImagesRoot & "/theme/menu/table-bottom-middle.gif'></td>" & CRLF response.write "<td align='right' valign='top' class='borderedge' background='" & sBBSTemplateImagesRoot & "/theme/menu/table-bottom-right.gif'> </td>" & CRLF response.write "<td align='right' valign='bottom' class='borderedge'>" response.write "<img src='" & sBBSTemplateImagesRoot & "/theme/menu/bottom-right-corner.gif'>" response.write "</td></tr></table>" & CRLF End Sub |
|
#2
|
||||
|
||||
|
try setting columns:
<colgroup> <col width="100"></col> <col width="200"></col> </colgroup> also, what you mean "stretches the width"? width of what? please be more specific. |
|
#3
|
|||
|
|||
|
I cannot use width in pixels.
Table width needs to be done in % I've uplaod some screens to show the exact same table. rendered in firefox and then in IE, both taken at the same screen resolution. Forgive the borders and color scheme :P I havent actually started designing my borders yet, was just doing some testing |
|
#4
|
|||
|
|||
|
Quote:
I don't think you can use single quotes ' in tables, can you? I never seen that before, I would try removing for no quotes at all or use "" to put a double quote around. Code:
<table width = "90%" bgcolor = "#000000"> or Code:
<table width = 90% bgcolor = #000000> |
|
#5
|
||||
|
||||
|
well, try giving width in percentage too all the cells in the first row only:
<td width="10%">...</td> <td width="88%">...</td> <td width="2%">...</td> giving the width in more than one place make no sense. by the way, I noticed the total width you assigned is more than 100% - probably IE isn't smart enough to deal with this. |
|
#6
|
||||
|
||||
|
Quote:
yes he can. only in the newer version of html (xhtml) will it finally be forbidden, but right now all browser support all forms: <td width=20% >, <td width='20%'> and <td width="20%"> |
|
#7
|
|||
|
|||
|
the problem it seems is with the 3 column. the image is not a background.
colgroups makes no difference. theres 2 ways I've gotten it to work.. neither is satisfactory. the first is to get the %'s right or to enter in the actual px. Ie the corner image is 19 px wide = 2% the center image = 93px = 11% the table is 160px wide (20% of the screen width of 800px) which means that column 2 and 4 which are the background repeaters till fill in the gaps = 15 px each. except that dosent work when the screen res increases. 20% wide table now = 204px plus we let our visotrs choose from 7 different layouts so in one layout theres 3 columns across the width of the page. for example with the news in the middle column at roughly 50% of the page width.. but then on another layout the news is in a table that spans all 3 coumns. making it's with close enough to 800. and again changing screen res = all new calculations. also what if someone puts in a large image into the news article... hard coding the widths = big gaps in the border of this enlarged table. not that we want people doing that with their news. but some users of the portal do it and our job is to try and cope with it as best as possible. anyway the second way I can do it is to make the 3 column image a background also with no repeat. that works kind of. but I really want to know why not having the 3 column border image as a background makes columns 2 and 3 have zero width (cos width='*' seems to = zero in IE in this circumstance) anyway the problem with having column 3 as a background is that IE and firefox think pixels are different sizes. 93 pixels = good firefox but in IE theres a gap where column 3 meets column 4 |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > IE table render issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|