Jump to content

Multiple lines in a cell within a table


niche

Recommended Posts

Are you talking about JavaScript? Text content? What you want is probably possible, if you explain it more clearly.FYI, if you ARE talking about JavaScript, it is usually best practice not to put ANY script in the content areas. There are other ways to bind elements to JavaScript functions.

Link to comment
Share on other sites

Looks like rowspan and colspan under the <td> tag should do the trick. What do you think?

Link to comment
Share on other sites

I think the whole point of their posts is that we have no idea what you are talking about. So sure, whatever works.

Link to comment
Share on other sites

Point!I'm thinking something like this: __________________________________________________ ___________________Logo___________________________ | Link | Content | __________________________________________________ _____________________Footer_________________________

Link to comment
Share on other sites

I think the whole point of their our posts is that we have no idea what you are talking about.
so really, what are you trying to do? The closest I can gather from that equally confusing post above is that you're trying to layout your page...with tables? If so, I would definitely recommend using CSS.
Link to comment
Share on other sites

You're quite right. Sorry for being vagueIn general, what do you think of this?

<html>  <head>  <title>Test Page</title>  </head>  <body>    <table width = "800px" align = "center">      <tr>        <td colspan = "2">         Best Business in town!	    </td>      </tr>      <tr>        <td width = "200px">          <a href="http://www.lincolnsrealdeals.com"> <img src="heinz4.png" /></a>        </td>        <td width = "600px">           </br> Content 		   </br> Content 		   </br> Content 		   </br> Content 		   </br> Content 		</td>      </tr>      <tr>        <td colspan = "2">          Hours: Daily 8 - 8        </td>      </tr>    </table>  </body> </html>

.

Link to comment
Share on other sites

I'd say tables are a bad idea for layout. Use css and divs/spans for that. Something like this might be better:

<div id='header'>Best Business in Town!</div><a id='imgLink' href="http://www.lincolnsrealdeals.com"> <img src="heinz4.png" /></a><div id='content'>   ...Content stuff here</div><div id='footer'>Hours: Daily 8 - 8</div>

Then with CSS you could target the divs/anchors/imgs by their id's and give them whatever formatting you wanted.

Link to comment
Share on other sites

You're quite right. Sorry for being vagueIn general, what do you think of this?
<html>  <head>  <title>Test Page</title>  </head>  <body>    <table width = "800px" align = "center">      <tr>        <td colspan = "2">         Best Business in town!	    </td>      </tr>      <tr>        <td width = "200px">          <a href="http://www.lincolnsrealdeals.com"> <img src="heinz4.png" /></a>        </td>        <td width = "600px">           </br> Content 		   </br> Content 		   </br> Content 		   </br> Content 		   </br> Content 		</td>      </tr>      <tr>        <td colspan = "2">          Hours: Daily 8 - 8        </td>      </tr>    </table>  </body> </html>

.

As I correctly surmised. Don't use table's for your layout. Instead use CSS to create div's that can be positioned and styled. Much cleaner, better performing, and is semantically correct. It may seem a bit confusing at first, but is well worth your while. Remember to validate and use a Strict DTD. :)
Link to comment
Share on other sites

I think I get it. Based on ShadowMage's example, I would just use positioning to to move the div's to where I need them. Right?

Link to comment
Share on other sites

sort of. do you mean using position: or do you mean to position thought the use of margins, paddings, and borders? The latter is the "better" practice except for specific situations. But yes, you are on the right path. If you don't already know, another good practice is to put your style declarations in a separate page. Learn the difference between ID's and classes, and just practice playing around with things. That will help you understand the box model the best. Try different things and observe what happens vs what you think would happen.

Link to comment
Share on other sites

I'll work on the difference between class and ID.In the meantime, thanks to dsonesuk, thescientist, abd ShadowMage for their valuable help.Niche

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...