Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table not formatted correctly in all browsers 1

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
NL
Can anyone suggest why the table in the page at formats as I want (cells correctly aligned under their header) in Internet Explorer and Edge, but not in Firefox or Chrome (where the data rows are all compressed under the first column header), and suggest how to get the desired result in all browsers? - Make a selection in the righthand dropdown list to see some data. The HTML and javascript are actually generated in Microsoft Access.

The code is essentially:

Code:
<table border='1' bordercolor='#CCCCCC' cellspacing='0' style="width:100%">
<tr>
  <td style="width:6%">Date due</td>
  <td style="width:14%">Responsible</td>
  <td style="width:30%">Action</td>
  <td style="width:30%">Source</td>
  <td style="width:20%">History</td>
</tr>
<tr>
  <td valign='top' style='background-color:red'><font color='white'>30 dec 2017 (662)</font></td>
  <td valign='top'><font color='black'>First name</font></td>
  <td valign='top'><font color='black'>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ut purus nunc.</font></td>
  <td valign='top'><font color='black'>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ut purus nunc.<hr>Response: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse ut purus nunc..</font></td>
  <td valign='top'><font color='black'>Toezegging gedaan 30 jun 2016</font></td>
</tr>
.
.
.
</table>
 
Hi

That is correct. If you set the [tt]display[/tt] property of an element to inline, then it will behave as an inline element.

Change those display values to the one according to the expected display type :
Code:
[COLOR=orange]eval[/color][teal]([/teal][i][green]"S_"[/green][/i] [teal]+[/teal] i[teal]).[/teal]style[teal].[/teal]display[teal]=[/teal][i][green]"[highlight]table-row[/highlight]"[/green][/i][teal];[/teal]
Note that old Explorer had no idea about the table related display types. That is why jQuery became so popular as it was able to handle such browser differences. ( Not anymore. Support for such old Explorer was dropped. )


Feherke.
feherke.github.io
 
Hello Fehérke,

Thank you - indeed! This is a rather ancient programme.

Peter D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top