searls03 Posted April 25, 2011 Share Posted April 25, 2011 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> Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/ Share on other sites More sharing options...
Fadion Posted April 25, 2011 Share Posted April 25, 2011 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; } Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206067 Share on other sites More sharing options...
searls03 Posted April 25, 2011 Author Share Posted April 25, 2011 ok, first off let me explain, I edited the button to be a link with css, but what I want to do, is make the value(what shows) limited to a certain number of letters/words then the rest moves to the next line.........does that make sense? Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206070 Share on other sites More sharing options...
Fadion Posted April 25, 2011 Share Posted April 25, 2011 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. Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206081 Share on other sites More sharing options...
searls03 Posted April 25, 2011 Author Share Posted April 25, 2011 sorry, I post here so often, I forget that it isn't always php......sorry, also I put it here cause the form was in PHP tags. Anyways, thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206085 Share on other sites More sharing options...
searls03 Posted April 25, 2011 Author Share Posted April 25, 2011 alright, I just realized that it underlines until the width has been reached........so there could be a word 2 px long but it will underline 100 px long.......how do I fix this? Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206086 Share on other sites More sharing options...
searls03 Posted April 25, 2011 Author Share Posted April 25, 2011 ok, the line didn't break, but it just cut it off.......is there a way to fix this? Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206088 Share on other sites More sharing options...
Fadion Posted April 25, 2011 Share Posted April 25, 2011 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; } Quote Link to comment https://forums.phpfreaks.com/topic/234695-limit-form-names-then-line-break/#findComment-1206108 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.