denoteone Posted December 28, 2007 Share Posted December 28, 2007 when I insert my $message into my table for my HTML email I need for the text to wrap. Right now if the message is to big the table just streches with it and puts the text all on one line? this is the table html below. <table align="center" border="1" bordercolor="gray" width="400"> Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/ Share on other sites More sharing options...
papaface Posted December 28, 2007 Share Posted December 28, 2007 This is not PHP, it is a CSS/HTML problem. Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424674 Share on other sites More sharing options...
nafetski Posted December 28, 2007 Share Posted December 28, 2007 If you're new to programming for the web, I'd highly suggest doing everything with <div> rather than tables. (You can still use tables for micromanaging certain parts of formatting easier, but divs will give you a lot more control and come in much handier later if you get into any Ajax programming) Right now, just to make things really simple for you - try putting everything that you're doing into a container div. (think, just a big box that constrains how wide your "page" is) #container { width: 80%; background-color:#FFFFFF; margin-top: 50px; margin-bottom: 50px; margin-left: auto; margin-right: auto; padding: 0px; border: 2px solid #000000; } This will just make a box, and the box is 80% the size of your users browser window. If you wanted to set a pixel dimension instead for width, you could do that too. Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424682 Share on other sites More sharing options...
denoteone Posted December 28, 2007 Author Share Posted December 28, 2007 my only problem is that I am sending the html in an email so I am trying to stay away from using css unless it is inline. Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424693 Share on other sites More sharing options...
p2grace Posted December 28, 2007 Share Posted December 28, 2007 If you set the width of one of the td's, the rest of the td's will fill in the rest of the space. This will make everything in the first td wrap instead of making the td wider. Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424712 Share on other sites More sharing options...
denoteone Posted December 28, 2007 Author Share Posted December 28, 2007 thank you! Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424715 Share on other sites More sharing options...
p2grace Posted December 28, 2007 Share Posted December 28, 2007 If the post has been solved can you please set it to "Solved". Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/83474-solved-my-php-variable/#findComment-424720 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.