Solved

set the font fit to the box html /css

Posted on 2008-06-16
2
204 Views
Last Modified: 2012-06-27
i plane to put the customername and address into <td>customername?address</td> in case the leter to long how can I make it  fit with table by reduce size of leter the name and the address i get form php
i plane to make a invoice and I use table to make evey item fit on each table
<table width="1224" height="269" border="1">
  <tr>
    <td>customer/name</td>
    <td>&nbsp;</td>
  </tr>
</table>

Open in new window

0
Comment
Question by:teera
[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
2 Comments
 
LVL 17

Assisted Solution

by:jasonsbytes
jasonsbytes earned 100 total points
ID: 21797828
check the strlen of the string and if it's over you max lenght use
preg_replace() to stip out or strip off characters from the end of the string.
0
 
LVL 4

Accepted Solution

by:
sajay_j earned 400 total points
ID: 21798989
I hope the following is a fix for your problem...
Regards Sajay.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
<title></title>
<style>
<!--
body { font-family:Verdana; margin: 0 auto; }
 
.leftdata, .rightdata { font-size:100%; text-align:justify; padding:10px; }
-->
</style>
</head>
 
<body>
<table width="100%" border="1">
  <tr>
    <td class="leftdata">customer/name</td>
    <td class="rightdata">sdfdsfdsfasfas asdfdasfdasfdasfdas<br>
dasfasdfdasfdasfdas</td>
  </tr>
</table>
</body>
</html>
 
 
 
 
/* CSS CODE */
body { font-fanily:Verdana; margin: 0 auto; }
 
.leftdata, .rightdata { font-size:100%; text-align:justify; padding:10px; }

Open in new window

0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

690 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