Solved

how to make the text go all around the image

Posted on 2006-07-10
5
207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set up Wildfly 10 8 470
how to exclude a file using regex 5 123
Use tracing facilities in your browser steps 2 129
how to add new optional parameter to JSP 1 61
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Suggested Courses

738 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