Wrapping text within a table

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

Moderator: kfury77

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

Wrapping text within a table

Post by jjstccean »

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)
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: HTMLPad 2008 ver (9.0.0.97)

Post by chrisjlocke »

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?)
jjstccean
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: HTMLPad 2008 ver (9.0.0.97)

Post by jjstccean »

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
User avatar
chrisjlocke
Top Contributor
Posts: 995
Joined: Mon Aug 01, 2005 4:12 pm
Location: Essex, UK
Contact:

Re: HTMLPad 2008 ver (9.0.0.97)

Post by chrisjlocke »

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
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: Wrapping text within a table

Post by syrupcore »

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. :)
jjstccean
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: Wrapping text within a table

Post by jjstccean »

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
User avatar
syrupcore
Top Contributor
Posts: 917
Joined: Thu Jul 21, 2005 12:58 am
Location: Portland, Oregon, usa
Contact:

Re: Wrapping text within a table

Post by syrupcore »

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
jjstccean
Posts: 6
Joined: Fri Jul 04, 2008 9:33 am

Re: Wrapping text within a table

Post by jjstccean »

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

jjstccean.
Post Reply