Jump to content

<td> and <li>


Recommended Posts

Sorry, english is not my former language. Is there a way to use td and il on the style form? I wish I could use td#cod {

style="list-style-type:square"; to make every table data named "cod" listed. Is that possible? Merci.


Here the code :


<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
table, th, td {
border: 1px solid black;
border-collapse: collapse;
th, td {
padding: 5px;
th, {
text-align: center;
td#cod {
<body style="background-color:lightgrey">
<table style="width:100%">
<caption style="font-size:200%">Licences populaires</caption>
<th>Call of Duty</th>
<th>Grand Theft Auto</th>
<th>Assassin's Creed</th>
<td id="cod"><li>Modern Warfare</li></td>
<td><li>Vice City</li></td>
<td id="cod"><li>World at War</li></td>
<td><li>San Andreas</li></td>
<td><li>Black Flag</li></td>
<td id="cod"><li>Black Ops</li></td>
<td><li>Liverty City</li></td>
<td id="cod"><li>Advanced Warfare</li></td>


Edited by einrech
Link to comment
Share on other sites

You can only use square bullet point in single cell and ref using class NOT id as id should be unique within page.

<td class="cod"><ul><li>Modern Warfare</li></ul></td>
The other don't require nothing, but if you want to wrap them within a element of some kind consider using paragraphs or span elements insfead.Note, this
th, {    text-align: center;}td#cod {    style="list-style-type:square";}
Should be
th {    text-align: center;}td.cod {    list-style-type:square;}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...