Unwanted paragraph markup
8 posts by 4 authors in: Forums > CMS Builder
Last Post: October 27, 2008 (RSS)
By rsekaly - October 24, 2008
Here is my code snippet:
<?php foreach ($announcementsRecords as $record): ?>
<center><h2><?php echo $record['title'] ?><h2></center>
<p><b>When<b>: <?php echo $record['when'] ?></p>
<p><b>Where</b>: <?php echo $record['where'] ?></p>
<p><b>Details</b>: <?php echo $record['content'] ?></p>
It looks like this on the website:
When:
{content from record 1}
Where:
{content from record 2}
etc....
When I checked the data in each record, I noticed that the content is wraped in <p>...</p> paragraph markup which forces the whitespaces. I've tried removing the <p> ...</p> in my code, but there is no difference. How can I get rid of the markup in each record?
Thanx!
Ragi Sekaly
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [rsekaly] Unwanted paragraph markup
The 'text box' field type will not wrap it's content with <p> tags.
Jim
Websites That Work
Re: [rsekaly] Unwanted paragraph markup
By _kate_ - October 25, 2008 - edited: October 25, 2008
http://www.interactivetools.com/iforum/forum.cgi?t=search_engine&do%3Dpost_view_flat%3Bsb%3Dpost_latest_reply%3Bso%3DASC%3Bpost%3D61790%3B=Next+Thread
Depending on your site layout there's a simple CSS you can add in so you can keep using the WYSIWYG section without the space, and also a link Dave posted about ways to make changes to the editor so it doesn't add the p tags.
Re: [_kate_] Unwanted paragraph markup
By rsekaly - October 25, 2008
With the css change Iwill have to check the rest of my site to see what it affected, but it doesn't look like any major areas have changed.
Thanx again!
Ragi Sekaly
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [rsekaly] Unwanted paragraph markup
By _kate_ - October 25, 2008
<style type="text/css">
</style>
If you have any other questions feel free to ask :)
Re: [_kate_] Unwanted paragraph markup
By rsekaly - October 25, 2008
Basically, I would like to have the record to start printing one space after the "Details:" title.
Any ideas?
Ragi Sekaly
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke
Re: [rsekaly] Unwanted paragraph markup
By Dave - October 27, 2008
Here's a post with some code that will remove the first <p> for you.
http://www.interactivetools.com/forum/gforum.cgi?post=63416#63416
Let me know if that works for you.
interactivetools.com
Re: [Dave] Unwanted paragraph markup
By rsekaly - October 27, 2008
Ragi Sekaly
"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke