firefox table border color problem - firefox

<table align="center" width="80%" border="1" cellspacing="0" bordercolor="#95F8FD">
<tr>
<th width="7%" rowspan="2" align="center"> </th>
<th colspan="3" align="center"> </th>
<th width="6%" rowspan="2" align="center"> </th>
<th colspan="2" align="center"> </th>
<th width="30%" rowspan="2" align="center"> </th>
<th width="5%" rowspan="2" align="center"> </th>
</tr>
</table><br>
border color is not showing correctly in firefox with this html block.but it works fine with chrome and IE.what's the problem with firefox?

You aught to use CSS for styling. With the exception of rowspan and colspan, just about all the other attributes you've used are deprecated.

Related

Formating View in maatwebsite Excel Export

I am new to maatwebsite Excel Export i am using view Excel Export in laravel and would like to know how one can specify the cell number where the data should go like a h1 tag like below snippet
<h5>PURCHASE ORDER</h5>
<hr>
<div class="container-flow">
<table id="table" class="table table-hover table-bordered table-sm text-center">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Product_Code</th>
<th scope="col"> Item_Description </th>
<th scope="col">Qty</th>
<th scope="col">Unit Price</th>
<th scope="col" >Value</th>
<th scope="col">Stock Less 90 Days</th>
<th scope="col">Stock More 90 Days</th>
when i export i get this
i would like to specify the cell where that tag should go like say cell B3 instead of current position cell A1
You can put some empty tags / cells before.
Try
<table>
<tr></tr>
<tr></tr>
<tr>
<td></td>
<td></td>
<td><h5>PURCHASE ORDER</h5></td>
</tr>
</table>
<hr>
<div class="container-flow">
<table id="table" class="table table-hover table-bordered table-sm text-center">
<thead>
<tr>
<th scope="col">No.</th>
<th scope="col">Product_Code</th>
<th scope="col"> Item_Description </th>
<th scope="col">Qty</th>
<th scope="col">Unit Price</th>
<th scope="col" >Value</th>
<th scope="col">Stock Less 90 Days</th>
<th scope="col">Stock More 90 Days</th>

Why Xpath 3.0 works, but Xquery 3.0 doesn't work with the same expression

I launched Xpath in Oxygen. In Xpath 3.0 found what i need but in Xquery 3.0 doesn't find.
This is my Xpath expression
//table[tbody/tr/th/p[contains(text(), 'All Water System Contacts')]]/tbody/tr[3]/td[1]
This is my xml code
I put part code.
<table border="1" cellpadding="1" cellspacing="1" summary="." width="640">
<tbody>
<tr>
<th colspan="3">
<p>All Water System Contacts </p></th>
</tr>
<tr>
<th>Type</th>
<th>Contact</th>
<th>Communication</th>
</tr>
<tr>
<td align="center">AC - Administrative Contact - GENERAL MANAGER </td>
<td align="center">GRANT, JOHN, W <br/> PO BOX 869<br/> BIG SPRING, TX 79721-0869 </td>
<td align="center">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
width="100%">
<tbody>
<tr>
<th><b>Electronic Type</b></th>
<th><b>Value</b></th>
</tr>
</tbody>
</table>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
width="100%">
<tbody>
<tr>
<th><b>Phone Type</b></th>
<th><b>Value</b></th>
</tr>
<tr>
<td align="center">BUS - Business</td>
<td align="center">432-267-6341 </td>
</tr>
<tr>
<td align="center">FAX - Facsimile</td>
<td align="center">432-267-3121 </td>
</tr>
<tr>
<td align="center">BUS - Business</td>
<td align="center">432-267-6070 </td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td align="center">OW - Owner </td>
<td align="center">COLORADO RIVER MUNICIPAL WATER DISTRICT <br/> PO BOX 869<br/> BIG
SPRING, TX 79721-0869 </td>
<td align="center"> </td>
</tr>
</tbody>
</table>
I tried different functions.
I don't know why it doesn't work and what difference
Please help me.
I suspect your real, complete input has an XHTML default namespace declaration xmlns="http://www.w3.org/1999/xhtml" and in oXygen for XPath you have the setting enabled to "use the default namespace of the root element" so your path works with XPath out of the box while for XQuery you need to make sure you explicitly set
declare default element namespace 'http://www.w3.org/1999/xhtml';
in the prolog of your XQuery file or code sample.

How to create a two column email newsletter

I am trying to create a two column email flyer but I'm having trouble with the coding as Outlook hates CSS.
I'm using tables to keep it as simple as possible but I want two separate tables on the left and the right so I can add data into it as I wish.
I tried using float left and right on the two tables but Outlook ignores this style.
I know the two grey tables at the bottom are each in their own separate "holder" tables but this is so I can duplicate the grey "data" tables for when I add new articles.
<table class="all" width="auto" height="auto" border="0" cellspacing="0"><tr><td height="504">
<table width="750" height="140" border="0" cellspacing="0">
<tr>
<td width="200" valign="bottom" bgcolor="#E6E6E6"> </td>
<td width="345" align="center" valign="bottom" bgcolor="#E6E6E6"> </td>
<td width="152" align="center" valign="bottom" bgcolor="#E6E6E6"> </td>
<td width="45" align="center" valign="bottom" bgcolor="#E6E6E6"> </td>
</tr>
<tr>
<td width="200" valign="bottom" bgcolor="#E6E6E6"> </td>
<td align="center" valign="bottom" bgcolor="#E6E6E6"><font color="#111111" face="Arial Narrow" size="+2">DECEMBER NEWSLETTER</font></td>
<td width="152" align="center" valign="bottom" bgcolor="#E6E6E6"><font size="2"><strong>#4 - <span class="orange">04.12.13</span></strong></font></td>
<td width="45" align="center" valign="bottom" bgcolor="#E6E6E6"> </td>
</tr>
</table>
<table width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="75" height="50" bgcolor="#E6E6E6" scope="row"> </td>
<td width="600" rowspan="2" scope="row"><img src="http://placehold.it/600x200"/></td>
<td width="75" bgcolor="#E6E6E6" scope="row"> </td>
</tr>
<tr>
<td width="75" height="81" scope="row"> </td>
<td scope="row"> </td>
</tr>
</table>
<table class="holder" width="750" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" scope="row">
<table class="inlinetableleft" width="360">
<tr>
<td width="371" align="left">
<!------------LEFT COLUMN------------------>
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr>
<th height="103" colspan="4" align="left" valign="middle" bgcolor="#CCCCCC" scope="row"> </th>
</tr>
</table>
<!--------------LEFT COLUMN END------------->
</td>
</tr>
</table>
<table class="inlinetableright" width="360">
<tr>
<td align="left">
<!------------RIGHT COLUMN------------------>
<table width="360" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="106" align="left" bgcolor="#CCCCCC" scope="row"> </td>
</tr>
</table>
<!-----------RIGHT COLUMN END-------------->
</td></tr>
</table>
</td>
</tr>
</table>
Here is a fiddle of my newsletter so far, it's the bottom two grey tables that I want to be side by side.
Fiddle
For HTML emails, nested tables are your friend :)
JSFiddle
Note: the border around the table is just to show you where the tables are.
<table border="0" width="600" cellpadding="0" cellspacing="0" align="center">
<tr>
<td colspan="2">
header content here
</td>
</tr>
<tr>
<td width="300">
<table border="0" width="300" cellpadding="1" cellspacing="0" align="left">
<tr>
<td>Left Content</td>
</tr>
</table>
</td>
<td width="300">
<table border="0" width="300" cellpadding="1" cellspacing="0" align="left">
<tr>
<td>Right content</td>
</tr>
</table>
</td>
</tr>
</table>

Parse table in HTML Agility Pack for WP7

I have following HTML:
<table cellspacing="8" cellpadding="6" border="1" style="color: Black; background-color: LightGoldenrodYellow;
width: 60%;" id="GridView2" rules="all">
<tbody>
<tr style="color: White; background-color: #CF4B0A; font-weight: bold;">
<th align="center" scope="col">
Booked At
</th>
<th align="center" scope="col">
Booked On
</th>
<th align="center" scope="col">
Delivered At
</th>
<th align="center" scope="col">
Delivered On
</th>
<th scope="col">
Details
</th>
</tr>
<tr align="left" style="color: #333333; background-color: #FFFBA1; font-family: Arial;
font-size: Small;">
<td align="center">
Not Available
</td>
<td align="center">
Not Available
</td>
<td align="center">
DATA
</td>
<td align="center">
12/01/2012
</td>
<td>
<a href="javascript:__doPostBack('GridView2$ctl02$LinkButton1','')" id="GridView2_ctl02_LinkButton1">
Details</a>
</td>
</tr>
</tbody>
</table>
I would like to parse the above table using HTML Agility pack. I'm using the HAP solution for WP7, downloaded from Codeplex.
Any quick help will be appreciated.
To parse the HTML, use HAP's HtmlDocument.LoadHtml() function and pass it the actual string. That will give you a DOM with all the HTML objects in it.

Finding table values in watij using xpath

I am using watij to automate my UI testing. I have many tables in a webpage. I need to find a table which has a width 95%. It contains many rows. I have to find each row with different text say "running first UI test on local" as below adn need to get the td value "Complete". I am not ble to get the value but I get the watij address. Let me know how I can find this.
<table width=95%>
<tr>
<th align="left">
<span id="lblHeaderComponent" style="font-size:10pt;font-weight:bold;">Component</span>
</th>
<th align="left">
<span id="lblHeaderServer" style="font-size:10pt;font-weight:bold;">Server</span>
</th>
<th align="left">
<span id="lblHeaderStatus" style="font-size:10pt;font-weight:bold;">
</span>
</th>
</tr>
<tr>
<td align="left"
nowrap="nowrap" style="font-size:12px;">running first UI test on local</td>
<td align="left" style="font-size:12px;">Google</td>
<td align="left" style="font-size:12px;">
<a style='color:#336600;'>Complete</a>
</td>
</tr>
<tr>
<td align="left"
style="border-top:1px solid #cfcfcf;border-bottom:1px solid #cfcfcf;"
colspan="3"
style="font-size:12px; color:#ff3300;">
</td>
</tr>
<tr>
<td align="left" nowrap="nowrap" style="font-size:12px;">running second UI test on local</td>
<td align="left" style="font-size:12px;">Google</td>
<td align="left" style="font-size:12px;">
<a style='color:#336600;'>Complete</a>
</td>
</tr>
</table>
You can try an xpath visualizer like this one to assist you in getting the right expression. It lets you see the results visually.
Using XPath on HTML assumes the HTML is XHTML - in other words it must be well-formed XML.

Resources