Jump to content

limit form names then line break


searls03

Recommended Posts

how do I make this form here have a limit on the value's name, then it moves to the next line?

 

<form action=\"reply.php?com_id=$com_id\" method=\"post\">
<font color='brown'><u><input type=\"submit\" name ='submit' class=\"link\" value='$title'></u></font>
</form>

Link to comment
Share on other sites

What? Your question, at least to me, doesn't make any sense!

 

PS: The "font" tag is deprecated and underlining an input element makes no sense at all. You can use CSS to specify font type, color and decorations.

 

Ex:

input { color:brown; font-size:15px; text-decoration:underline; }

Link to comment
Share on other sites

Oh lol, think I got it, but it has nothing to do with PHP.

 

CSS Code

input.link { width:100px; } /* change the value to your needs */

 

The width property will specify the dimensions of the button and if it's value attribute goes longer than 100px (or whatever), it will break the line.

Link to comment
Share on other sites

You're right, didn't think well about it. Input button can't break, but you can use the button tag which is a lot more flexible. It acts in the same exact way as an input type submit.

 

<form action="reply.php?com_id=$com_id" method="post">
<button type="submit" name="submit" class="link">A very long lone which should normally break across several lines.</button>
</form>

 

CSS Code

button.link { background:none; border:none; width:100px; }

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.