How to use the ordered list in a table, in which each cell will define a list item. like
.
There's no way to define the column first. So I tried to make something like . (This is not what I need. I just tried something because I had no clue to do something like the first picture.)
With this Html code:
<table cellspacing="0" border="1">
<ol type="1">
<tr>
<th>Heading 1</th>
<td>
<li> data</li>
</td>
<td>
<li> data</li>
</td>
<td>
<li> data </li>
</td>
</tr>
</ol>
<ul type="square">
<tr>
<th>Heading 2</th>
<td>
<li> data</li>
</td>
<td>
<li> data</li>
</td>
<td>
<li> data </li>
</td>
</tr>
</ul>
<ol type="A">
<tr>
<th>Heading 3</th>
<td>
<li> data</li>
</td>
<td>
<li> data </li>
</td>
<td>
<li> data </li>
</td>
</tr>
</ol>
</table>
Now I'm confused, how can I use <li> of an ordered or unordered list in each cell to make it as a list view?
Since a few days my clickable tags inside my SVG stopped working in google chrome. It's weird and i have tried "everything" and it's STILL not working. This only happens in "Google Chrome" (i'm using Versions 67 and 68 beta)!
Halfway through my SVG I can't click or select anything anymore. it does not have to do with the nav list (the same happens with div tags).
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid" width="4984" height="3534" viewBox="0 0 4984 3534">
<svg id="side_1" x="0" y="0" width="2000" height="3534" version="1.1">
<foreignobject x="118" y="348" width="1406" height="2895">
<body xmlns="http://www.w3.org/1999/xhtml">
<nav class="section__list">
<ul>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>test ?</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
Can't click this
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
<li class="section__block" style="margin-bottom: 30px;">
<table>
<tr>
<td>
<h2>Can't select this</h2>
</td>
</tr>
</table>
</li>
</ul>
</nav>
</body>
</foreignobject>
</svg>
</svg>
Thanks in advance!
This has been fixed in Chrome 69 See http://crbug.com/859461.
I have HTML code as below which intern has a hyper link
<div class="metro hotel_metro margbot3">
<a href='/directory/tour-operator/a1-bhutan-travel-services'>
<h5>
<img src='http://tcb.img.ebizity.bt/images/thumb/tcb-tour_092716_IMG_7812.JPG' />
A1 Bhutan Travel Services
</h5>
</a>
and the href has following html code
<h1 class="margbot3">
A1 Bhutan Travel Services
</h1>
<table cellpadding="4" cellspacing="0" class="table_listing margright1 margbot5 w_48">
<tr>
<td width="100px" align="center">
<img src='http://tcb.img.ebizity.bt/images/medium/tcb-tour_092716_IMG_7812.JPG' />
</td>
</tr>
</table>
<table cellpadding="4" cellspacing="0" class="table_listing margright1 margbot5 w_48">
<tr>
<td>
<b>Office Hours </b>
</td>
<td>
9:00 AM to 5:00 PM
</td>
</tr>
<tr>
<td>
<b>Year Established</b>
</td>
<td>
2016
</td>
</tr>
<tr>
<td>
<b>License Holder</b>
</td>
<td>
Pema Yangden
</td>
</tr>
<tr>
<td width="100px">
<b>Address </b>
</td>
<td>
Chubachu, Thim Throm, Thimphu
</td>
</tr>
<tr>
<td>
<b>Telp </b>
</td>
<td>
00975- 17672013
</td>
</tr>
<tr>
<td>
<b>Fax </b>
</td>
<td>
NA
</td>
</tr>
<tr id="_cph_content__rpt_info__tr_email_0">
<td>
<b>Email </b>
</td>
<td>
<a href='mailto:pema#travelbhutan.com '>pema#travelbhutan.com </a>
<ul class="list_submenu" style="display: none;">
<li style="list-style: none !important;"><a href="#top" id="pop">Contact
A1 Bhutan Travel Services
ยป</a> </li>
</ul>
</td>
</tr>
<tr>
<td>
<b>Website </b>
</td>
<td>
<a href='http://www.travelbhutan.com' target='_blank'>www.travelbhutan.com</a>
</td>
</tr>
<tr>
<td>
<b>Specialize In</b>
</td>
<td>
<ul>
<li>
Adventure
</li>
<li>
Art
</li>
<li>
Bird Watching
</li>
<li>
Cultural
</li>
<li>
Customized
</li>
<li>
Cycling
</li>
<li>
Festivals
</li>
<li>
High-End
</li>
<li>
Honeymoon
</li>
<li>
Photography
</li>
<li>
Pilgrimage
</li>
<li>
Spiritual/Wellness
</li>
<li>
Trekking
</li>
<li>
White Water Rafting
</li>
</ul>
</td>
</tr>
</table>
<div class="clear">
</div>
<p>
Arranging Bhutan tour for regional and Foreign tourist. </p>
</div>
</div>
</div>
I want to transform it to following XML format using XSLT
<document>
<name>A1 Bhutan Travel Services </name>
<Office Hours>9.00Am</Office Hours>
<Year Established>2015 </Year Established>
I am new to XSLT so could anyone help me with sample XSLT which would be required to transform the above HTML to XML.
I need to create an ordered list, which has text and pictures.
i.e.
To do this, I have put the text and images in tables.
<ol>
<li>
<table>
<tr>
<td>
Tyrannasaurus
</td>
</tr>
<tr>
<td>
<img style="float: left; margin-top: 5px;" src="Tyrannasaurus.png" />
</td>
</tr>
</table>
</li>
<li>
<table>
<tr>
<td>
Brontosaurus
</td>
</tr>
<tr>
<td>
<img style="float: left; margin-top: 5px;" src="Brontosaurus.png" />
</td>
</tr>
</table>
</li>
<li>
<table>
<tr>
<td>
Triceratops
</td>
</tr>
<tr>
<td>
<img style="float: left; margin-top: 5px;" src="Triceratops.png" />
</td>
</tr>
</table>
</li>
</ol>
However, the problem now is that the numbers don't actually line up with the text- the numbers are too high.
Is there a better method I should be using? It doesn't seem like it should be so hard.
You can just use something like this:
<ol>
<li>
<h3>Animal 1</h3>
<img src="http://lorempixel.com/400/200/animals/1/" alt="">
</li>
<li>
<h3>Animal 2</h3>
<img src="http://lorempixel.com/400/200/animals/2/" alt="">
</li>
<li>
<h3>Animal 3</h3>
<img src="http://lorempixel.com/400/200/animals/3/" alt="">
</li>
</ol>
The above code looks this way:
Fiddle: http://jsfiddle.net/praveenscience/gxqnbv7r/
I am attempting to align two separate tables in html. I want them centered with one on the left, one on the right and some space between the tables. Here is the code I currently have set up. I have them aligned, but one is left and one is right with lots of space between them. New to Html please would be appreciated!
<h1>
Retrofit</h1>
<p>
Kendell Retrofit is the latest division to the Kendell divisions. Our Retrofit team includes customer service, outside sales, production and keying specialists. </p>
<div>
<table style="float:left">
</table>
<table align="left" border="0" cellpadding="0" cellspacing="2" style="width: 150px;">
<thead>
<tr>
<th scope="col" style="text-align: left;">
Markets:<br />
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>
Commercial</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Financial</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Global</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Government</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Healthcare</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Higher Education</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
K-12 Education</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Retail</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<table style="float:right">
</table>
<table align="right" border="0" cellpadding="0" cellspacing="2" style="width: 150px;">
<thead>
<tr>
<th scope="col" style="text-align: left;">
<p>
Brands:</p>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<ul>
<li>
Arrow</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Best</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Corbin Russwin</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Dorma</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Falcon</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Kwikset</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Sargent</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Schlage</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Stanley</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Weiser</li>
</ul>
</td>
</tr>
<tr>
<td>
<ul>
<li>
Yale</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<hr />
<p>
</p>
Basic nested table will do it.
<table width="600px" >
<tr>
<td style="width: 50%;" >
<table width="100%" >
<tr>
<td>
content of left side
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 50%;" >
<table width="100%" >
<tr>
<td>
content of right side
</td>
</tr>
</table>
</td>
</tr>
</table>
Check it here
Note: margin: 0 auto; makes your table at the center
Instead of using float left/right use inline-table as shown below:
table
{
display:inline-table;
}
This way you can have tables side by side.
If you change the value of "style="width: 150px" by one more high (200px or 250px), does it work ?
You only need to float the first table. Then you simply add margin-right: 50px; (for example) to it and the second one will be next to it, 50px away. If you want to center them both, put them in a div with some width and add margin: 0 auto;. Here is a jsbin example.
P.S.: Press edit in top-right corner to see the code. The good thing about using this float to the first table, with 2 seperate tables and with margin: 0 auto; to the parent div is that it is responsive. Try resizing the browser window and you will see how the tables seperate on smaller resolutions (good for a website that is designed to run on smartphones too)
They are misaligned because you have Markets:<br /> in first table and <p>Brands:</p> in second table. You need to be consistent with them.
You can use float:left; and margin-right on the first div to get the spacing.
JSBin sample (Seems like Fiddle is down)
See this DEMO
You can try on the second table :
<table style="float:left">
and replace on the second table :
align="right"
with
align="left"