WebBrowser Doesn't Display a Simple Table Correctly

Geoff_Olding

New member
Dec 30, 2013
1
0
0
Hello there

I am unable to get the WebBrowser control to display a simple table correctly in the Windows Phone 8 emulator.

I am calling NavigateToString() with a string containing the following:

<html>
<body>
<table width=\"100%\">
<tr>
<td>First Line left hand column</td><td>Right</td>
</tr>
<tr>
<td>Second Line left hand column</td><td>Right</td>
</tr>
</table>
</body>
</html>

The data in the 2nd column is displayed in a much smaller font.

What is it doing? Is there any way to get this control to display the HTML correctly, or at least more sensibly?
 
Code:
 It will be easier for people to read this if you put it in code-tags
:wink:
 
It's been documented before that the navigateToString() function for the web browser control in windows phone 8 is messed up (WebBrowser.NavigateToString Broken in Windows Phone 8 and also affects Windows Phone 7 apps ?€“ Solution Included - Mikael Koskinen). Right now, all you can really do if you are dead set on keeping the table code is to wait for a fix in the next windows phone update. Otherwise, I would suggest that you try using (nested) div tags and some css to emulate a table. Besides, the width attribute you are using in the table tag is deprecated (according to HTML5 standards).

If you are dead set on keeping the table code, then you could also experiment with a javascript function that will write it out to the page. For that, you might or might not have to use the invokeScript() function of the web browser control to execute the javascript function.
 
You can solve this problem by using css and applying a zoom to all tables.
Code:
table{
  zoom:300%;
}
 

Members online

Forum statistics

Threads
333,979
Messages
2,256,945
Members
428,720
Latest member
df416587