einrech Posted September 11, 2015 Share Posted September 11, 2015 (edited) 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"> <style> table, th, td { border: 1px solid black; border-collapse: collapse; } th, td { padding: 5px; } th, { text-align: center; } td#cod { style="list-style-type:square"; } </style> </head> <body style="background-color:lightgrey"> <table style="width:100%"> <caption style="font-size:200%">Licences populaires</caption> <tbody><tr> <th>Call of Duty</th> <th>Grand Theft Auto</th> <th>Assassin's Creed</th> </tr> <tr> <td id="cod"><li>Modern Warfare</li></td> <td><li>Vice City</li></td> <td><li>Revelation</li></td> </tr> <tr> <td id="cod"><li>World at War</li></td> <td><li>San Andreas</li></td> <td><li>Black Flag</li></td> </tr> <tr> <td id="cod"><li>Black Ops</li></td> <td><li>Liverty City</li></td> <td><li>Unity</li></td> </tr> <tr> <td id="cod"><li>Advanced Warfare</li></td> <td><li>V</li></td> <td><li>Syndicate</li></td> </tr> </tbody></table> </body></html> exercice_11.html Edited September 11, 2015 by einrech Link to comment Share on other sites More sharing options...
dsonesuk Posted September 11, 2015 Share Posted September 11, 2015 No, you can't separate li into individual td cells only altogether into a single cell and li must have parent element of ul or ol element. Link to comment Share on other sites More sharing options...
einrech Posted September 11, 2015 Author Share Posted September 11, 2015 What do you suggest me to do? : / Link to comment Share on other sites More sharing options...
dsonesuk Posted September 11, 2015 Share Posted September 11, 2015 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, thisth, { text-align: center;}td#cod { style="list-style-type:square";}Should beth { text-align: center;}td.cod { list-style-type:square;} Link to comment Share on other sites More sharing options...
dsonesuk Posted September 12, 2015 Share Posted September 12, 2015 Use span instead of ul/ol with li <td class="cod"><span>Modern Warfare</span></td> .cod span { display: list-item;margin-left: 20px;padding-left: 10px;list-style-type: square;} Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now