Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to make the text go all around the image

Posted on 2006-07-10
5
Medium Priority
?
214 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 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

If you’re involved with your company’s wide area network (WAN), you’ve probably heard about SD-WANs. They’re the “boy wonder” of networking, ostensibly allowing companies to replace expensive MPLS lines with low-cost Internet access. But, are they …
Check out what's been happening in the Experts Exchange community.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

730 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