Solved

set the font fit to the box html /css

Posted on 2008-06-16
2
200 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

867 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

16 Experts available now in Live!

Get 1:1 Help Now