Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to make the text go all around the image

Posted on 2006-07-10
5
Medium Priority
?
217 Views
Last Modified: 2010-04-01
Hi
I have a table which is divided by <td> . The first table data contains text and othe other table data contains image
now what I need is that if the text exceeds the image width it covers both the table data. The mage is of a fixed width.

Any help will be greatly appreciated

here's the code
--------------------------------------------------------------------------------
<tr>
      <td height="100" >
         <table width="508">
      
             <% while(sponsor_iterator.hasNext()){
                 ChapterSponsor chapter_sponsor = (ChapterSponsor)sponsor_iterator.next();
             %>
            <tr>
              <td>
                  <b> Company: </b><%= chapter_sponsor.getSponsor_name() %><br><br>
                  <b> Contact Information</b><br><br>
                  <b>      First Name: </b><%= chapter_sponsor.getContact_firstName() %> <br>
                  <b> Last Name: </b><%= chapter_sponsor.getContact_lastName() %> <br>
                  <b> Phone: </b><%= chapter_sponsor.getContact_phone() %> <br>
                  <b> Email: </b><%= chapter_sponsor.getContact_email() %> <br>
                  <b> Website: </b><%= chapter_sponsor.getImage_link() %> <br>
                  <b> Ad copy: </b><%= chapter_sponsor.getDescription() %> <br>
                  <p>
                  <hr width = "200" align ="left">
              </td>
                         
                   <td>
                  <a href ="<%= chapter_sponsor.getImage_link() %>" ><img src="attachments/sponsors/<%=chapter_ID%><%=chapter_sponsor.getSponsor_ID()%>" width="200" height="100"></a>
               </td>
      </tr>
      <p><p>
       <% } %>
       </table>
    </td>
  </tr>
0
Comment
Question by:huzefaq
  • 3
  • 2
5 Comments
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 17079064
do you have to have the table width fixed.. ?? >><table width="508">


try having the table <table width="100%"> & see if that fixes your problem
0
 

Author Comment

by:huzefaq
ID: 17082026
I actually have to make the table width fixed. is there any other way.
Thanks for yor help

0
 
LVL 19

Expert Comment

by:Kuldeepchaturvedi
ID: 17082229
okay try noWrap as true...
<td noWrap=true>
<b> Company: </b><%= chapter_sponsor.getSponsor_name() %><br><br>
               <b> Contact Information</b><br><br>
               <b>     First Name: </b><%= chapter_sponsor.getContact_firstName() %> <br>
               <b> Last Name: </b><%= chapter_sponsor.getContact_lastName() %> <br>
               <b> Phone: </b><%= chapter_sponsor.getContact_phone() %> <br>
               <b> Email: </b><%= chapter_sponsor.getContact_email() %> <br>
...
...
...

...
0
 

Author Comment

by:huzefaq
ID: 17082506
kuldeepchatruvedi I tried putting nowrap bt it just exteds the rows to fill the whole screen

0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 2000 total points
ID: 17088100
let me double check.. you want that if the text exceeds the width of image then it should wrap around but should stay with in the image width
Or you dont want it to wrap around & take over the space of Image?

Since you have
<td height="100" >
         <table width="508">
     
at the top, it will fix the hight of the whole table.. i.e. you dont have much space to play around...

one option is to change the <td height="100"> to just plain <td>

or other one is to

give the inner td a specific height

<td height="80">
<b> Company: </b><%= chapter_sponsor.getSponsor_name() %><br><br>
               <b> Contact Information</b><br><br>
               <b>     First Name: </b><%= chapter_sponsor.getContact_firstName() %> <br>
               <b> Last Name: </b><%= chapter_sponsor.getContact_lastName() %> <br>
               <b> Phone: </b><%= chapter_sponsor.getContact_phone() %> <br>
               <b> Email: </b><%= chapter_sponsor.getContact_email() %> <br>


try these options & let me know
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question