Hello,
I am currently extracting my XHTML from a couple of fields in a database to make up the main content of the pages.
However when I echo it out all the <div>’s get bunched up together in the source code, and I’m sure this is why it gives me layout errors in Safari, and nothing else.
Is there any way to ‘pad out’ the spacing between parts of the HTML.
I’d tried using the ‘nn’ and it worked on something else, but not this one sadly.
[code=php]
echo ‘<div class=”centrewide”>’;
echo ‘<img src=”‘ . $main_image . ‘” alt=”‘ . $title . ‘” />’;
echo ‘<div class=”left_content2″>’;
echo $left_content;
echo ‘</div>’;
echo ‘<font color=”#fff”>’;
echo ‘nn’;
echo ‘</font>’;
echo ‘<div class=”centre_content2″>’;
echo $centre_content;
echo ‘</div>’;
echo ‘<font color=”#fff”>’;
echo ‘nn’;
echo ‘</font>’;
echo ‘<div class=”right_content2″><img src=”../img/answers_questions.jpg” width=”154″ height=”741″ /></div>’;
The variables like $centre_content are XHTML taken from the SQL database.
I’m sure I’ve seen an easy way to ‘pad’ out the coding, but just can’t seem to do it.
Any solutions would be most helpful.
Thank you!