Help - Search - Members - Calendar
Full Version: Writing on right side of a table
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
smarty3010
CODE

<html>
<head>
</head>
<body>
<table border= 1px>
<tr> <td> 11 </td> <td> 12 </td> </tr>
<tr> <td> 21 </td> <td> 22 </td> </tr>
</table>
<br>
Hello
</body>
</html>


How can I write on the right side of the table ?
pandy
Many ways, this is one.

HTML
<table border="1" align="left">

http://htmlhelp.com/reference/html40/tables/table.html

Please note that it's border="1", not border= 1px. In CSS you write out the px unit, in HTML you do not.
Darin McGrew
You could use the align="left" attribute to float the table left, although it is deprecated. You can also use the CSS float property.
http://htmlhelp.com/reference/html40/tables/table.html
http://htmlhelp.com/reference/css/box/float.html
smarty3010
Thanks a lot pandy and Darin McGrew....was looking for a solution since days...

<table float="left"> didn't work...

Just curious to know....What are the other ways to do so ?
pandy
QUOTE(smarty3010 @ Mar 4 2011, 07:22 PM) *

<table float="left"> didn't work...


Because it's wrong. It's <table style="float: left"> . See http://htmlhelp.com/reference/css/style-html.html .

QUOTE
Just curious to know....What are the other ways to do so ?


None as direct as these. You can create a layout in many ways. The old way would be to use another (outer) table to create two columns and place the table in the left and the text in the right. The modern way is to use CSS and there are too many ways to do it to describe them all here. It also depends on how you want the whole page to look.
smarty3010
Thanks a lot again pandy smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.