Jump to content

<Td> Tag Issue


Swarfega

Recommended Posts

Hi.

 

 

I've got another issue. Basically, I'm using a while loop to drag all the Data from the database to display on a page. Consider it a 'Guestbook', if you will, except for all users. (Chat)

 

The problem is that I can't find any legit way using <td> tag-attributes to lock the Message in its place (I have this issue on the normal GuestBook invidiual for each user as well). I'm better of just showing you what I'm talking about:

 

 

http://i49.tinypic.com/qoyd8l.png

 

I want the <td> Tag to display the whole message, but once it reaches the drawn-Red line, I want it to make a new line and keep the message flowing like that until the message has been fully printed.

 

 

I've tried the following:

- <td width='xx'> Tag

- <td class='xx' width='xx'> Tag (CSS)

 

 

And nothing thus far has worked out.

 

 

Any suggestions what to do to lock it in place?

Link to comment
Share on other sites

The better way would have been to use the proper HTML tags for this, as a guestbook isn't tabular data. This is quite easily done with a div-block, and a bit of CSS:

<div class="post">
   <img class="avatar" src="avatar.png">
   <h3>{$Name}</h3>
   <h4>{$Date}</h4>
   <p>{$Post}</p>
</div>

 

With that HTML you'll only need the following CSS:

div.post {
   width: 600px;
}

div.post:after {
   content: ".";
   height: 0px;
   display: block;
   visibility: hidden;
   clear: left;
}

div.post img {
   float: left;
}

div.post h3 {
   display: inline;
}

div.post h4 {
   display: inline;
}

div.post h4:before {
   content: " - ";
}

 

Not tested, but should work.

Edited by Christian F.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.