Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

align="center" doesn't center content in table
(1 viewing) (1) Guest
All your queries regarding HTML will be solved in this forum
  • Page:
  • 1
TOPIC:

align="center" doesn't center content in table

align="center" doesn't center content in table 1 year, 9 months ago #168

  • amelia
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
Hello,

I would like to center 'Books' but align=center seems dont work on it.
Any idea?

The following is the code which i tried.
<table border="1">
<tr>
<th align="center" >Books</th>
</tr>
<tr>
<td>HTML</td>
<td>$590</td>
</tr>
</table>

Thanks

Re:align="center" doesn't center content in table 1 year, 9 months ago #171

  • palak
  • OFFLINE
  • Senior Boarder
  • Posts: 55
  • Karma: 0
You have one column for the first row and two columns for the second. Change it to:

<table border="1">
<tr>
<th align="center" colspan = “2”>Books</th>
</tr>
<tr>
<td>HTML</td>
<td>$590</td>
</tr>
</table>

Hope it works for you.
  • Page:
  • 1
Time to create page: 1.84 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download