seco Posted February 5, 2008 Share Posted February 5, 2008 Hi i want to wrap the text inside the div element. is there any css can help me? Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/ Share on other sites More sharing options...
AndyB Posted February 5, 2008 Share Posted February 5, 2008 div class="banana">some text</div> define the class 'banana' to be whatever you want. http://www.w3schools.com/css/default.asp Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/#findComment-458420 Share on other sites More sharing options...
seco Posted February 5, 2008 Author Share Posted February 5, 2008 i want to wrap the text what i can write???? Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/#findComment-458581 Share on other sites More sharing options...
phpQuestioner Posted February 5, 2008 Share Posted February 5, 2008 Maybe this will help you: http://www.w3schools.com/CSS/pr_text_white-space.asp If you have the div set to specific width and you do not have a continuous string of text (without any white spaces); the text in the div should wrap automatically to the next line. Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/#findComment-458587 Share on other sites More sharing options...
seco Posted February 5, 2008 Author Share Posted February 5, 2008 thanks for reply i have a div that has a width 20% and i assign white-space: pre; at the css file and i write continuous and the text still no wrap for the text !!! i want when i write a line that is more wider the the div it should wrapped thanks. Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/#findComment-458692 Share on other sites More sharing options...
mainewoods Posted February 11, 2008 Share Posted February 11, 2008 "white-space: pre" also stops wrapping so why do you have that in there? Quote Link to comment https://forums.phpfreaks.com/topic/89484-how-to-wrap-te-texst-inside-div/#findComment-464281 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.