Solved

set the font fit to the box html /css

Posted on 2008-06-16
2
199 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
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
echo button 13 45
Adding Pipe Delimeter  between buttons in css 4 15
PHP string issue 5 16
addressing a specific html page 9 19
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

8 Experts available now in Live!

Get 1:1 Help Now