WYSIWYG Spacing

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 16, 2009   (RSS)

By Mohaukla - February 14, 2009

I know this is a topic that has been discussed before but I am not finding any answers from the other threads that might help me.
I have a simple list veiwer that is giving me extra space between the Title and the Content. I have taken aou the breaks and it still resolves that same. I am attributing this to the <p> that the TinyMce adds to the code. I have not had any trouble until now.

Here is my code:
<span class="lhead">Latest news</span>:<p>
<?php foreach ($side_newsRecords as $record): ?>
<span class="lhead"><?php echo $record['title'] ?></span>
<?php echo $record['content'] ?>
<?php endforeach; ?></p>


And here is the page it is currently on:
http://www.rileytours.com/summer/full.php?Niagara-Falls-5

I need these to be tight (Title and Content)
Any suggestions?

Thanks
Michael Moyers



Owner of Just Rite Design Inc. A growing network of professionals in web design, graphic design, flash development, programming, and audio & video productions.



"Due to budget constraints, the Light at the end of the tunnel will be temporarily out!"

Re: [justritedesign] WYSIWYG Spacing

By MisterJim - February 15, 2009

Add this CSS to your file named main.css. The first line that begins with .lhead is already in your file. Add the following 2 (bold) lines in the order that I have them here:

.lhead { font-weight: bold; font-size: 10px; text-transform: uppercase; color: #5D9E13; }
.lhead + p { margin-top: 0; }
p span.lhead { display: block; margin-top: 10px; margin-bottom: -10px; }


Note: This is a quick and dirty way to use CSS. I don't really recommend it, but it should solve your immediate problem.. namely to tighten up the space in between title and content in your sidebar items. The second line that I gave you is necessary because for some reason the title code for that top item, unlike the others, is wrapped in a <span> tag that is, itself, wrapped in a <p>.

Jim
WebCamp One, LLC



Websites That Work