At 2:04 PM +0100 5/23/11, Tim Dawson wrote:
On 23/05/2011 12:36, Bobby Jack wrote:
--- On Mon, 5/23/11, Tim Dawson<t...@ramasaig.com>  wrote:

I've applied an outline to a para within a div, and I want to apply
the same outline to a para underneath the div. (OUTLINE, not
border)

See: http://www.holidaymullandiona.com/wrongoutline.html (this is
an abbreviated version of the page, to illustrate the problem)

It works in FF to a point, but for some reason still unclear the
outline on the separate para expands to embrace the div above.

The div is floated, so the following paragraph's *box* overlaps it.
Try clearing the paragraph and you'll see the desired styling.

- Bobby

Thank you. Of course I should have realised that. Slapped wrist.

Now I'm trying to get the outline to wrap just the text of the para.
I don't want to set a fixed width (say 'width: 400px;') because the actual text can vary in width. The best way I've found so far is to insert a <span> round the text, and put the outline on that.
Is there a better way ?

--
Tim Dawson
Maolbhuidhe
Fionnphort
Isle of Mull  PA66 6BP


Tim:

If it was me, I would simply create a class (class="outline") and use it. Here's an example:

http://www.webbytedd.com/cccc/outline/

Here's the code:

CSS

.outline {border: 1px solid red;}

HTML

<p class="outline">
   This is my paragraph.
</p>

However, I'm pretty simple on this stuff.

Cheers,

tedd

PS: You may want to pad the rule.

--
-------
http://sperling.com/
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to