The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Paragraph background color formatting
Magician
post May 11 2011, 06:35 PM
Post #1





Group: Members
Posts: 3
Joined: 11-May 11
Member No.: 14,529



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>

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 12 2011, 03:39 AM
Post #2


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 15,571
Joined: 9-August 06
Member No.: 6



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


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Magician
post May 14 2011, 08:00 PM
Post #3





Group: Members
Posts: 3
Joined: 11-May 11
Member No.: 14,529



Just by the change in background color. Thanks for the reply.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 14 2011, 09:55 PM
Post #4


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 15,571
Joined: 9-August 06
Member No.: 6



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.


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Magician
post May 14 2011, 11:49 PM
Post #5





Group: Members
Posts: 3
Joined: 11-May 11
Member No.: 14,529



Beautiful!! Thank you so much!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 15 2011, 09:08 AM
Post #6


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 15,571
Joined: 9-August 06
Member No.: 6



You're welcome. wink.gif


--------------------
"Never go to excess, but let moderation be your guide."
- Cicero

IPB Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 31st October 2014 - 07:02 AM