Solved

how to make the text go all around the image

Posted on 2006-07-10
5
193 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 500 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now