This is CSS problem !?

U can use
if (strlen($users['User']['name']>10))
{
$class = 'short';
}
else
{
$class = 'long';
}
<h1 class="<?=$class?>"> .....
Add css styles for short&long classes.

Remember, this is not cakePHP related but off topic.

On Aug 24, 7:55 am, "Isaac Raja" <[EMAIL PROTECTED]> wrote:
> Hi ,
>
>    Please excuse me if this is a newbie question. I retrieve all the fields
> from the database using models &  i get them through
>
> $users['User']['name']    ---->name
>
> $users['User']['qualification']  ----> qualification
>
> and i display them thru  the below statement in the view file
>
> <h1>Mr.<?php echo $users['User']['name'] ?><?php echo
> $users['User']['qualification']
> ?></h1>
>
> The problem is, the length of [user][name] is varchar 30 & qualification is
> varchar 30.
>
> Some times, the User name is short---> eg Tom
> Sometimes the user name is lengthy ---> eg  Michael Augustin Sarajevo
> silvers
>
> when the user name is normal, i can get it displayed correctly, but if it is
> lengthy, it wraps to the next line, & i need to avoid that.
>
> and if set the font size to small, short user names are also small,
>
> is there any way to change the size of the font dynamically, depending upon
> the number of characters entered in the username field?
>
> or any ideas on this will be helpful. please
>
> Thanks in advance
>
> Isaac Raja


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to