Wrapping text within a table

Discuss general web development questions. Help others and get help from others.

Moderator: kfury77

Wrapping text within a table

Postby jjstccean » Fri Jul 04, 2008 2:19 pm

Hi. I'm doing a (table with one cell (within a table)) - I have a paragraph of text typed into the first table between <td><p>Paragraph</p></td> -
What I don't seem to get right is to have the paragraph in the main table "wrap around and down" the extra inserted table? I keep on having to add some </br>'s to achieve this; is this the only way to do it? - please, any suggestions or assistance will be greatly appreciated. :D

Thank you

jjstccean.


Diagram:
Image
(click for bigger pic)
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: HTMLPad 2008 ver (9.0.0.97)

Postby chrisjlocke » Fri Jul 04, 2008 2:24 pm

As this isn't a fault with the program, I'll move this to the 'self help' forum.

Any chance of a diagram or sketch of what you're trying to achieve? (even draw it using the tables in Word?)
User avatar
chrisjlocke
Top Contributor
 
Posts: 966
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK

Re: HTMLPad 2008 ver (9.0.0.97)

Postby jjstccean » Fri Jul 04, 2008 3:54 pm

Thank you kindly for your time. I seem to have a problem uploading "tablewithintable.jpg - it is only 42.2kb.

I'll try again later.

jjstccean
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: HTMLPad 2008 ver (9.0.0.97)

Postby chrisjlocke » Fri Jul 04, 2008 4:17 pm

Feel free to email it to me blumentals at chrisjlocke dot co dot uk and I'll host it. :)

Edit: Have changed your topic title to something more meaningful.

Edit #2: Have included your pic in your original post.
User avatar
chrisjlocke
Top Contributor
 
Posts: 966
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK

Re: Wrapping text within a table

Postby syrupcore » Fri Jul 04, 2008 7:23 pm

Please post your source code. We'll help you fix it and then convince you to not use tables for laying out text - but only after we fix it, promise. :)
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa

Re: Wrapping text within a table

Postby jjstccean » Sat Jul 05, 2008 8:08 am

Hi syrupcore

OK, you've convinced me. I'm not going to waste any more time on using tables to layout text as it is a real slog - but only if you can convince me otherwise please. :D

thank you.

jjstccean
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: Wrapping text within a table

Postby syrupcore » Sun Jul 06, 2008 12:25 am

Here's one way to do it.

The HTML:
Code: Select all
<div id="content">
   <h1>Welcome to my website</h1>
   <div class="callout">
       <p>Areas covered: "Cape South ....</p>
   </div>
   <p>Microtigers computers is managed from a home ...</p>
</div>


Then, in your CSS add:
Code: Select all
div#content{
  margin: 0 auto; /* will center the content in the browser */
  overflow: hidden;
  width: 960px;  /* or whatever width you want your main container to be */
}

div.callout{
  border: 1px solid #cccccc;
  float: right;
  width: 200px;
}


You'll need to play around with it but that should get your started. You can read more about floats here: http://css.maxdesign.com.au/floatutorial/

Will
User avatar
syrupcore
Top Contributor
 
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa

Re: Wrapping text within a table

Postby jjstccean » Sun Jul 06, 2008 7:38 am

Thank you very much syrupcore, and also for the extra info! I appreciate it.

jjstccean.
jjstccean
 
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am


Return to Web Developer Talk

Who is online

Users browsing this forum: No registered users and 1 guest

cron