I have html like the following:
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td height="20" colspan="2">
</td>
</tr>
<tr>
<td height="20" colspan="2" class="fontDestaque2NegritoHome">
MATRÍCULA: PPAAG
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
</td>
<td align="right" valign="middle" class="tx_bd">
</td>
</tr>
<tr>
<td width="35%" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Fabricante:</span>
</div>
</td>
<td width="59%" align="right" valign="middle" class="tx_bd">
<div align="left">
CESSNA AIRCRAFT</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Modelo:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
T206H</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número de Série:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
T20608735</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
Tipo ICAO :
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
C206</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Tipo de Habilitação para Pilotos:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
MNTE</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Classe da Aeronave:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
POUSO CONVECIONAL 1 MOTOR CONVENCIONAL</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Peso Máximo de Decolagem:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
1633 - Kg</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número Máximo de Passageiros:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
005</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" background="../images/bgPontilhado.gif"
class="tx_bd">
<div align="left">
<img src="../images/bgPontilhado.gif" width="4" height="1"></div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Categoria de Registro:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
PRIVADA SERVICO AEREO PRIVADOS</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Número dos Certificados (CM - CA)</span>:
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
19040</div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Situação no RAB:</span><span class="stop_litle">
</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="fontRed">ARRENDAMENTO OPERACIONAL/ALIENACAO FIDUCIARIA</span></div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Data da Compra/Transferência:</span>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" background="../images/bgPontilhado.gif"
class="tx_bd">
<div align="left">
<img src="../images/bgPontilhado.gif" width="4" height="1"></div>
</td>
</tr>
<tr>
<td colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
</div>
</td>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Data de Validade do CA: </span>
</div>
</td>
<td width="3%" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bd">21/05/16</span></div>
</td>
</tr>
<tr>
<td align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
<div align="left">
Data de Validade da IAM:
</div>
</div>
</td>
<td align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bd">110513</span></div>
</td>
</tr>
<tr>
<td height="18" align="right" valign="middle" class="tx_bd">
<div align="left">
<span class="tx_bold">Situação de Aeronavegabilidade:</span>
</div>
</td>
<td height="18" align="right" valign="middle" class="tx_bd">
<div align="left">
Normal</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left" class="tx_bold">
Motivo(s):
</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="right" valign="middle" class="tx_bd">
<div align="left">
<blockquote>
<p>
<span class="tx_bold"></span>
</p>
</blockquote>
</div>
</td>
</tr>
<tr>
<td height="18" colspan="2" align="left" valign="middle" class="tx_bd">
Consulta realizada em: 16/8/2012 15:52:45<br>
</td>
</tr>
I want to grab the following text:
Cessna Aircraft
T206H
T20608735
C206
MNTE
POUSO CONVECIONAL 1 MOTOR CONVENCIONAL
1633 - Kg
005
PRIVADA SERVICO AEREO PRIVADOS
19040
ARRENDAMENTO OPERACIONAL/ALIENACAO FIDUCIARIA
21/05/16
110513
Normal
Some of the div's just contain the text I need. Other div's contain a span that contains the text I need. How would I construct the xpath for this?
Use:
//tr/td[#align='right' and #valign='middle' and #class='tx_bd']
/div[#align='left 'and not(*)]
/text()
Related
Here is the html I am trying to scrape using Xpath:
<table class="ClassGrid" cellspacing="0" cellpadding="0" border="0" id="_ctl0_phMainContent_dgrdClasses" style="border-collapse:collapse;">
<tbody>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 123
<br>
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#104">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">12/12/2018</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl3_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4233&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">1/24/2019</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl4_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4306&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 4</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBoxNone"></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl6_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4346&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, August 30</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl7_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4313&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, September 8</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl8_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4330&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, September 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl9_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4331&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 0000
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#190">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, July 21</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl11_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4242&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, August 28</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl12_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4243&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Tuesday, September 25</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl13_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4271&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 456
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#69">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Wednesday, August 1</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl15_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4276&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 25</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl16_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4277&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, September 13</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl17_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4348&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, October 6</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl18_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4278&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Wednesday, October 31</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl19_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4279&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, November 17</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl20_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4280&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1">Address 789
<br><a target="_blank" class="gridDirections" href="/Classes/Directions.aspx#223">Directions</a></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 4</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl22_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4347&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Saturday, August 18</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl23_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4305&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1">
<div class="ClassGridBox1"></div>
</td>
<td class="ClassGridRow2">
<div class="ClassGridBox2">Thursday, September 20</div>
</td>
<td class="ClassGridRow3">
<div class="ClassGridBox3"><a id="_ctl0_phMainContent_dgrdClasses__ctl24_hplAddToCart" class="whitelight" href="/validate.aspx?ClassID1=4332&ClassID2=0">Book Now</a></div>
</td>
</tr>
<tr>
<td class="ClassGridRow1" colspan="3">
<hr>
</td>
</tr>
</tbody>
And I am trying to return the value of ClassGridRow1, ClassGridRow2 and ClassGridBox3 if ClassGridRow1 contains the text string
"Address 123"
for example. So far, I have had no luck retrieving anything but just the context node's contents. Can anyone please assist? Most appreciated!
If you have all XPath features available you could select the <div class="ClassGridBox1"> node and mangle the text() with a regex fn:replace:
//tbody/tr/td/div[#class="ClassGridBox1"]/[replace(text(),'(^[a-zA-Z.-]+ [0-9]+).*','$1', 's')]
Demo
Or a bit relaxed with some post text processing:
//tbody/tr/td/div[#class="ClassGridBox1"]/text()
This is how it looks in GMail mobile app when sent from Outlook:
How can I avoid those big gaps?
My code is as follows:
<table id="sig" width='320' cellspacing='0' cellpadding='0' border-spacing='0' style="width:320px;margin:0;padding:0;">
<tr>
<td valign='top' width="120" height="48" style="width:120px;height:48px;margin:0;padding:0;vertical-align:top;">
<a style="border:none;text-decoration:none;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/logo.jpg" alt="Crisalix" width='120' height='48' style="border:none;width:120px;height:48px;display:block;">
</a>
</td>
</tr>
<tr>
<td>
<table id="sig1" cellspacing='0' width='320' cellpadding='0' border-spacing='0' style="padding:0;margin:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;mso-line-height-rule:exactly;line-height:11px;color:#b0b0b0;border-collapse:collapse;-webkit-text-size-adjust:none;width:320px;">
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-weight:600;line-height:1.6;font-size:13px;">
<span style="color:#137191">Jaime</span>
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-size:12px;line-height:1">
<span style="color:#555555">Chief Executive Officer</span>
</td>
</tr>
<tr>
<td valign='top' width="27" height='21' style="width:27px;height:1px;margin:0;padding:0;vertical-align:top;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/separator.jpg" alt="Crisalix" width='27' height='21' style="border:none;width:27px;height:21px;display:block;">
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="width:320px;margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-size:12px;line-height:1.4;">
<div><span style="color:#137191;font-weight:bold">P / </span><span style="color:#555555;"></span></div>
<div><span style="color:#137191;font-weight:bold">A / </span><span style="color:#555555">Parc Scientifique (PSE-A) - EPFL1015</span></div>
<div> <span style="color:#555555"> Lausanne | Switzerland </span></div>
</td>
</tr>
<tr style="margin:0;padding:0;">
<td style="margin:0;padding:0;font-family:sans-serif,Arial,'Helvetica Neue',Helvetica;white-space:nowrap;font-weight:600;line-height:1.6;font-size:13px;width:320px;">
<span style="color:#137191;border:none;text-decoration:none!important;color:#137191;">www.crisalix.com</span>
</td>
</tr>
<tr>
<td valign='top' width="27" height='21' style="width:27px;height:1px;margin:0;padding:0;vertical-align:top;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/separator.jpg" alt="Crisalix" width='27' height='21' style="border:none;width:27px;height:21px;display:block;">
</td>
</tr>
</td>
</table>
</tr>
<tr>
<td valign='top' width="230" height="225" style="width:230px;height:225px;margin:0;padding:0;vertical-align:top;">
<a href='http://www.crisalix.com' title="Crisalix" style="border:none;text-decoration:none;">
<img moz-do-not-send="true" src="https://s3.amazonaws.com/media_crisalix/signatures/signature-banner.jpg" alt="Crisalix" width='230' height='225' style="border:none;width:230px;height:225px;display:block;">
</a>
</td>
</tr>
</table>
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>
I have set both the header and the footer to fixed but still cannot get the content to adjust in IPhone.
Here is my layout code
<body>
<div data-role="page" #(Page.Id == null ? string.Empty : "id=" + Page.Id) data-fullscreen="false">
#* #RenderSection("MoreCode", false)*#
#if (IsSectionDefined("Header"))
{
<div data-role="header" data-position="fixed">
#RenderSection("Header", false)
</div><!-- /header -->
}
<div data-role="content">
#RenderBody()
</div><!-- /content -->
<div data-role="footer" data-tap-toggle="false" data-position="fixed">
<div class="center-wrapper">
<table border="0">
<tr>
<td>
<label for="basic">
Place Of Interest
</label>
</td>
</tr>
<tr>
<td>
<table border="0">
<tr>
<td>
Terms of Use
</td>
<td>
<label for="basic">
|
</label>
</td>
<td>
Privacy Policy
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>
Here is my View
<h3 style='color:#4FA600; font-weight:bold;'>#ViewBag.Number</h3>
<table border="1" width="100%">
<tr>
<td align="center" valign=middle style=' font-weight:bold; color:#FFFFFF; background:#4FA600; '>
<label for="basic">Available Documents</label>
</td>
</tr>
<tr>
<td>
<table width="100%" height="100%">
<tr>
<td align="left" valign="middle" style=' font-weight:bold;'>
Type
</td>
<td align="center" valign="middle" style=' font-weight:bold;'>
Description
</td>
</tr>
#{
foreach(var row in Model)
{
<tr>
<td align="left" valign="middle">
#row.DocType
</td>
<td align="center" valign="middle">
#row.Description
</td>
</tr>
}
}
</table>
</td>
</tr>
</table>
Isnt jquerymobile suppose to manually adjust? It renders fine in firefox. What can I do to make the content fully display?
\The issue was I had this in my css:
[data-role=page]{height: 100% !important; position:relative !important;}
I got this code from use theme roller not sure why this messed it up. Maybe someone can clarify would be appreciated
I have this form
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
<tr>
<td width="32%" valign="top"> <strong class="main_title">Select Category: </strong></td>
<td width="68%" valign="top" class=""><? $qu="SELECT `id`,`name` FROM `linkvideos_category` WHERE `status` = '1'"; $rs=$Q($qu); ?>
<select name="category" class="blacktext" >
<option>Choose Category</option>
<? while($dis=$F($rs)) { ?>
<option value="<?=$dis['id']?>"> <?=$dis['name'];?></option>
<? } ?>
</select></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Upload Image: </strong></td>
<td valign="top" class=""><input type="file" name="imagefile" /> </td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title"> Your Link : </strong></td>
<td valign="top" class=""><input name="link" type="text" size="50" /></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title"> Link Title : </strong></td>
<td valign="top" class=""><input name="linkname" type="text" size="50" /></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Description:</strong></td>
<td valign="top"><label>
<textarea name="desc" cols="40" rows="10"></textarea>
</label></td>
</tr>
<tr>
<td valign="top"> <strong class="main_title">Security Code:</strong></td>
<td valign="top">
<? if ($error==3) { ?>
<font color="red">Invalid Code Entered</font>
<?}?>
<?php
require_once('captcha/recaptchalib.php');
echo recaptcha_get_html($public_key);
?></td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td colspan="2" valign="top" class=""> </td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" class=""><input type="submit" name="Submit" value="Submit" class="btns" onclick="javascript:return check();" /></td>
</tr>
</form>
and i'm verifying the captcha with this
$resp = recaptcha_check_answer ($private_key,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
$error = 3;
echo"<script>window.location='submit_linkvideo.php?error=3';</script>";
}
and every time it's telling me the captchas invalid and saying incorrect-captcha-sol, am I missing something? I've tested it and the recaptcha values arn't being submitted.
Fixed it by ending a table before the form then starting the table again once inside the form.