On Mon, Feb 22, 2010 at 11:01:58AM +0000, Brett Parker wrote:
On 22 Feb 10:04, Chris G wrote:
So if I wrap the three paragraphs with the contained <a> in them in a further <div> then setting the margin/padding/border on that should have some effect?
I'll go and do some playing. :-)
Well, wrapping them in a div with its own style then you'd do things like:
div.mymagicclass p { margin: 0; padding: 0; }
That way you only affect the p tags in the new wrapping div.
In the end I decided it was easier to stop the code (PHP) generating the <p> at all. It used to create this:-
<p><a class="folder" href="#folded_1"> Test</a></p><div class="folded hidden" id="folded_1">This is the text that is hidden or shown</div> <p><a class="folder" href="#folded_2"> Test1</a></p><div class="folded hidden" id="folded_2">This is some more hidden text</div> <p><a class="folder" href="#folded_3"> Test2</a></p><div class="folded hidden" id="folded_3">And this is still more</div>
I have changed the PHP code that generates the HTML so that it produces this:-
<a class="folder" href="#folded_1"> Test</a><br><div class="folded hidden" id="folded_1">This is the text that is hidden or shown</div> <a class="folder" href="#folded_2"> Test1</a><br><div class="folded hidden" id="folded_2">This is some more hidden text</div> <a class="folder" href="#folded_3"> Test2</a><br><div class="folded hidden" id="folded_3">And this is still more</div>
Both the CSS and the PHP are part of a plugin so it makes little 'philosphical' difference which I changed and the above change means that my 'source' code that creates these folded sections can remain without any non-standard extras.
Thanks for the help.