dumdumsareyum Posted July 6, 2009 Share Posted July 6, 2009 I have a grid of buttons that I would like to have all the same width (specified button width: 100px for example). However when I specify this width, some of the text gets cut off. I specified overflow: visible, which seemed to do zip. I know i can insert a new line to manually make it wrap, however the text is coming from a database so I won't know exactly how long it will be. I can write a function to insert it with php, but if there's a CSS option I'd much rather use that. Thanks! Link to comment https://forums.phpfreaks.com/topic/164936-solved-word-wrap-on-fixed-width-button/ Share on other sites More sharing options...
seventheyejosh Posted July 6, 2009 Share Posted July 6, 2009 source of CSS and HTML ? or link? Link to comment https://forums.phpfreaks.com/topic/164936-solved-word-wrap-on-fixed-width-button/#findComment-869855 Share on other sites More sharing options...
rhodesa Posted July 6, 2009 Share Posted July 6, 2009 Add a white-space:normal to the style: <input type="button" style="width:100px;white-space:normal;" value="This is a really long button name" /> Link to comment https://forums.phpfreaks.com/topic/164936-solved-word-wrap-on-fixed-width-button/#findComment-869874 Share on other sites More sharing options...
dumdumsareyum Posted July 6, 2009 Author Share Posted July 6, 2009 Worked like a charm! Thanks a bunch! Link to comment https://forums.phpfreaks.com/topic/164936-solved-word-wrap-on-fixed-width-button/#findComment-869879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.