Click here to get back home

css text wrap and background problem

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
css text wrap and background problem w33bster@googlemail.com 07-17-2007
Get Chitika Premium
Posted by w33bster@googlemail.com on July 17, 2007, 7:48 am
Please log in for more thread options


Hi
I have some text that I want to add a background-color to so I've got
a span tag with a class defining the following:

display:inline;
color:#FFFFFF;
border-top:5px solid #65C7C6 ;
background-color:#65C7C6;

which works great if my text all fits on one line however the problem
comes when wrapping the text. I magically lose the border on the next
line which is a tad frustrating.

I've tried wrapping the lot in a p tag with similar css to above as
well as using padding instead of a border.

here is an example of what I'm after:
http://www.rees-jenkins.co.uk/stuff/textwrapproblem.gif

any one got any ideas?

w33b


Posted by w33bster@googlemail.com on July 17, 2007, 8:38 am
Please log in for more thread options


wrote:
> Hi
> I have some text that I want to add a background-color to so I've got
> a span tag with a class defining the following:
>
> display:inline;
> color:#FFFFFF;
> border-top:5px solid #65C7C6 ;
> background-color:#65C7C6;
>
> which works great if my text all fits on one line however the problem
> comes when wrapping the text. I magically lose the border on the next
> line which is a tad frustrating.
>
> I've tried wrapping the lot in a p tag with similar css to above as
> well as using padding instead of a border.
>
> here is an example of what I'm
after:http://www.rees-jenkins.co.uk/stuff/textwrapproblem.gif
>
> any one got any ideas?
>
> w33b


sorry, instead of border-top:5px solid #65C7C6 ; that should be
border:5px solid #65C7C6 ;

(all the way round, not just the top)

this doesn't fix the problem I just wrote it wrong!


Posted by Rik on July 17, 2007, 9:32 am
Please log in for more thread options


On Tue, 17 Jul 2007 14:38:51 +0200, w33bster@googlemail.com

> wrote:
>> Hi
>> I have some text that I want to add a background-color to so I've got
>> a span tag with a class defining the following:
>>
>> display:inline;
>> color:#FFFFFF;
>> border-top:5px solid #65C7C6 ;
>> background-color:#65C7C6;
>>
>> which works great if my text all fits on one line however the problem
>> comes when wrapping the text. I magically lose the border on the next
>> line which is a tad frustrating.
>>
>> I've tried wrapping the lot in a p tag with similar css to above as
>> well as using padding instead of a border.
>>
>> here is an example of what I'm
>> after:http://www.rees-jenkins.co.uk/stuff/textwrapproblem.gif
>>
>> any one got any ideas?
>>
>> w33b
>
>
> sorry, instead of border-top:5px solid #65C7C6 ; that should be
> border:5px solid #65C7C6 ;
>
> (all the way round, not just the top)
>
> this doesn't fix the problem I just wrote it wrong!


Could you put up the HTML somewhere instead of an image?
--
Rik Wasmus

Posted by Beauregard T. Shagnasty on July 17, 2007, 9:37 am
Please log in for more thread options


w33bster@googlemail.com wrote:

> "w33bs...@googlemail.com" multi-posted:
>> Hi
>> I have some text that I want to add a background-color ... to so I've got
>
> sorry, instead of ..

Perhaps you could look for answers already posted in the other two
groups you multi-posted this question. Learn to cross-post, not
multi-post. Thanks for your consideration.

http://oakroadsystems.com/genl/unice.htm#xpost

--
-bts
-Motorcycles defy gravity; cars just suck

Similar ThreadsPosted
Newbie Text Wrap Question October 6, 2005, 3:29 am
Newby image/ text wrap question December 18, 2006, 4:46 am
box with text with grey background July 9, 2006, 6:49 pm
Composition of text and background colors. March 28, 2005, 9:58 am
White text on black background...HTML May 14, 2008, 5:21 pm
fixed background image w/css problem September 27, 2004, 9:29 pm
Google tool bar changes text input background color November 14, 2007, 2:50 pm
To wrap or not to wrap "C++"? September 13, 2008, 10:23 am
HOWTO: html no wrap? July 24, 2007, 2:57 am
Can I wrap an tag inside an tag? May 15, 2008, 3:50 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap