WebBrowser Doesn't Display a Simple Table Correctly

Geoff_Olding

New member
Dec 30, 2013
1
0
0
Visit site
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?
 

Catholic Tech Geek

New member
Feb 2, 2012
130
0
0
Visit site
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.
 

Members online

Forum statistics

Threads
323,252
Messages
2,243,524
Members
428,049
Latest member
velocityxs