Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ General Web Design _ Paragraph background color formatting

Posted by: Magician May 11 2011, 06:35 PM

Hi,

I'm a struggling HTML editor. My major task is to modify code generated by eBay's Turbo Lister to tweak the format of my listings.

Below is an example of my attempt to change the background color of successive paragraphs. The problem I have is that I have white space after the single line 2nd paragraph with the 33000 (brown) background. If I add a line break, as in the 4th paragraph, I get rid of the white space but no longer have a single line paragraph and the text is not vertically centered. I can add a line break at the top of that paragraph to make it centered but it still not a single line.

Thanks in advance for your help.



<P style="BACKGROUND-COLOR: green" align=center><BR><STRONG><FONT color=#ffffff size=5>Another Quality Item From</FONT></STRONG><BR><FONT face=Arial><FONT size=7><EM><U><STRONG><FONT color=#ffffff> The Campbell Camera  Collection</FONT></STRONG></U><BR></EM><BR></FONT></FONT><FONT color=#ffffff><FONT size=5><STRONG>NOW 100% 30-DAY WARRANTY ON ALL ITEMS!</FONT></STRONG></FONT></FONT><BR><BR><BR><BR>

<!--PARAGRAPH 2-->
<P style="BACKGROUND-COLOR: #330000" align=center><FONT color=#ffffff size=6><STRONG>ITEM DESRIPTION</STRONG></FONT>; <BR>

<P style="BACKGROUND-COLOR: green; PADDING-LEFT: 2em; PADDING-RIGHT: 2em" align=leftr><FONT size=4><FONT color=#ffffff><STRONG><BR>You are bidding on a clean Mamiya/Sekor manual focus 50mm, f2.0 lens with an M42 mount <BR><BR>This fast prime lens will fit Pentax, Mamiya/Sekor, Praktica and others with the M42 screw mount. <BR><BR>It can be used in either automatic or manual aperture mode.<BR><BR>The lens is in good cosmetic condition with minor paint wear on the aperture ring.  The glass clean and sharp.  It is free of scratches, fungus and oil.  All adjustments are free and smooth.  It will come with both front and rear caps and a haze filter.</STRONG></FONT></FONT> <BR><BR>

<!--PARAGRAPH 4-->
<P style="BACKGROUND-COLOR: #330000" align=center><FONT color=#ffffff size=6><STRONG>WARRANTY<BR></STRONG></FONT></FONT><BR>

<P style="PADDING-BOTTOM: 2em; BACKGROUND-COLOR: green; PADDING-LEFT: 2em; PADDING-RIGHT: 2em; PADDING-TOP: 2em" align=left><FONT size=4><STRONG><FONT color=#ffffff>You have 30 days to evaluate your purchase.<BR><BR>In the event the item is not as represented, I will issue a full refund including shipping both ways.<BR> <BR>Return postage refunded is limited to the original shipping charge.<BR>(Shipping reimbursement is not available on Foreign shipments.<BR><BR>I will also accept the return of non-defective items, and will refund the purchase price but not shipping either way.  Just let me know and get permission to return it.<BR><BR></FONT><B><FONT color=#ffffff><FONT size=5><STRONG>THERE IS NO BETTER EBAY SELLER WARRANTY!</STRONG></FONT></FONT></P>


Posted by: pandy May 12 2011, 03:39 AM

So how do you want to denote the paragraphs if not with whitespace?

Posted by: Magician May 14 2011, 08:00 PM

Just by the change in background color. Thanks for the reply.

Posted by: pandy May 14 2011, 09:55 PM

Ah, I see. Add "margin: 0" to the style rule for each paragraph and ditch the BR tags and all should be well. Also use a closing P tag. Yes, it's optional in HTML but it sometimes helps.

Posted by: Magician May 14 2011, 11:49 PM

Beautiful!! Thank you so much!

Posted by: pandy May 15 2011, 09:08 AM

You're welcome. wink.gif

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)