I have some generated HTML which is as follows:-
<div class=level1> <p>
This is the playground
</p>
<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></div>
<span id="folded_reveal" style="display:none;"><!-- reveal --></span> <span id="folded_hide" style="display:none;"><!-- hide --></span>
I want to pack the "Test", "Test1" and "Test2" closer together vertically and I'm having little success. I was expecting that setting the following would do it:-
.folder { margin-top: 0; padding-top: 0; font-weight: bolder; border-width: thin; border-color: blue; background-color: cyan; padding-left: 2px; padding-right: 9px; background: url(closed.gif) no-repeat right center; }
The font-weight CSS is having its effect, changing it does change the font weight, but the colours (e.g. the background colour) have no effect at all, and nor do the margin/padding/border settings.
What am I doing wrong? Is there some 'outer' CSS that has priority over these settings? If so how can I override it?
On 21 Feb 22:48, Chris G wrote:
I have some generated HTML which is as follows:-
<div class=level1> <p> This is the playground </p> <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></div> <span id="folded_reveal" style="display:none;"><!-- reveal --></span> <span id="folded_hide" style="display:none;"><!-- hide --></span>
I want to pack the "Test", "Test1" and "Test2" closer together vertically and I'm having little success. I was expecting that setting the following would do it:-
.folder { margin-top: 0; padding-top: 0; font-weight: bolder; border-width: thin; border-color: blue; background-color: cyan; padding-left: 2px; padding-right: 9px; background: url(closed.gif) no-repeat right center; }
The font-weight CSS is having its effect, changing it does change the font weight, but the colours (e.g. the background colour) have no effect at all, and nor do the margin/padding/border settings.
What am I doing wrong? Is there some 'outer' CSS that has priority over these settings? If so how can I override it?
You'll be hitting the padding on the p tag, if the p was of class folder, rather than the contained a, you'd be quids in.
On Sun, Feb 21, 2010 at 11:48:07PM +0000, Brett Parker wrote:
On 21 Feb 22:48, Chris G wrote:
I have some generated HTML which is as follows:-
<div class=level1> <p> This is the playground </p> <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></div> <span id="folded_reveal" style="display:none;"><!-- reveal --></span> <span id="folded_hide" style="display:none;"><!-- hide --></span>
I want to pack the "Test", "Test1" and "Test2" closer together vertically and I'm having little success. I was expecting that setting the following would do it:-
.folder { margin-top: 0; padding-top: 0; font-weight: bolder; border-width: thin; border-color: blue; background-color: cyan; padding-left: 2px; padding-right: 9px; background: url(closed.gif) no-repeat right center; }
The font-weight CSS is having its effect, changing it does change the font weight, but the colours (e.g. the background colour) have no effect at all, and nor do the margin/padding/border settings.
What am I doing wrong? Is there some 'outer' CSS that has priority over these settings? If so how can I override it?
You'll be hitting the padding on the p tag, if the p was of class folder, rather than the contained a, you'd be quids in.
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. :-)
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.
Cheers,
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.
Chris G wrote:
I have some generated HTML which is as follows:-
<div class=level1> <p> This is the playground </p> <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></div> <span id="folded_reveal" style="display:none;"><!-- reveal --></span> <span id="folded_hide" style="display:none;"><!-- hide --></span>
I want to pack the "Test", "Test1" and "Test2" closer together vertically and I'm having little success. I was expecting that setting the following would do it:-
.folder { margin-top: 0; padding-top: 0; font-weight: bolder; border-width: thin; border-color: blue; background-color: cyan; padding-left: 2px; padding-right: 9px; background: url(closed.gif) no-repeat right center; }
The font-weight CSS is having its effect, changing it does change the font weight, but the colours (e.g. the background colour) have no effect at all, and nor do the margin/padding/border settings.
What am I doing wrong? Is there some 'outer' CSS that has priority over these settings? If so how can I override it?
The lack of packing is probably because you've only overridden the top margin of the paragraph tag, whereas its vertical spacing is all in the bottom margin. So to fix that, you could try:
.folder { margin: 0; }
which makes /all/ the margins zero. It's also worth doing the same with padding, so you'd have
.folder { margin: 0; padding: 0; }
The lack of colors and so on are because <a> tags, in general, do not inherit [most of] their parent's properties, or rather they consider their own style as implicitly !important. Therefore, you need to apply styles like this to the <a> directly, either by giving it a class, or by selection, e.g.:
.folder a { border-width: thin; border-color: blue; background-color: cyan; }
this will give any anchor that's a child of the .folder class the properties you require.
Hth, Simon
On Mon, Feb 22, 2010 at 10:09:04AM +0000, Simon Ransome wrote:
Chris G wrote:
I have some generated HTML which is as follows:-
<div class=level1> <p>
This is the playground
</p>
<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></div>
<span id="folded_reveal" style="display:none;"><!-- reveal --></span> <span id="folded_hide" style="display:none;"><!-- hide --></span>
I want to pack the "Test", "Test1" and "Test2" closer together vertically and I'm having little success. I was expecting that setting the following would do it:-
.folder { margin-top: 0; padding-top: 0; font-weight: bolder; border-width: thin; border-color: blue; background-color: cyan; padding-left: 2px; padding-right: 9px; background: url(closed.gif) no-repeat right center; }
The font-weight CSS is having its effect, changing it does change the font weight, but the colours (e.g. the background colour) have no effect at all, and nor do the margin/padding/border settings.
What am I doing wrong? Is there some 'outer' CSS that has priority over these settings? If so how can I override it?
The lack of packing is probably because you've only overridden the top margin of the paragraph tag, whereas its vertical spacing is all in the bottom margin. So to fix that, you could try:
.folder { margin: 0; }
which makes /all/ the margins zero. It's also worth doing the same with padding, so you'd have
.folder { margin: 0; padding: 0; }
The lack of colors and so on are because <a> tags, in general, do not inherit [most of] their parent's properties, or rather they consider their own style as implicitly !important. Therefore, you need to apply styles like this to the <a> directly, either by giving it a class, or by selection, e.g.:
.folder a { border-width: thin; border-color: blue; background-color: cyan; }
this will give any anchor that's a child of the .folder class the properties you require.
Thanks for all the thoughts, very helpful.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Simon Ransome wrote:
The lack of colors and so on are because <a> tags, in general, do not inherit [most of] their parent's properties, or rather they consider their own style as implicitly !important. Therefore, you need to apply styles like this to the <a> directly, either by giving it a class, or by selection, e.g.:
By the way, although I've been subscribed to this list for several years (lurking, mostly) I have posted from time-to-time, and would probably post some more, except that it's never been obvious how to get off moderation (and thus replies I make can sometimes be in limbo for days, which should not to be taken as a dig at the moderator(s), but is just a fact of life).
I have a vague feeling that it may be because I either subscribed with my "raw" email address of simon@nosher.demon.co.uk way back when, or that ALUG's mailman is seeing this is a different address from the simon@nosher.net I actually use as my from/reply-to. I did have a quick scan of the headers, but as both addresses legitimately appear as part of the chain it's hard to say.
Would I be best just to try re-subscribing, or I have I missed some obvious thing I'm meant to do...?
Cheers, Simon
- -- - --------------------------------------------------------------------- Simon Ransome http://nosher.net
Photography RSS feed - http://nosher.net/images/images.rss
On Thu, Feb 25, 2010 at 10:12:08PM +0000, simon ransome wrote:
By the way, although I've been subscribed to this list for several years (lurking, mostly) I have posted from time-to-time, and would probably post some more, except that it's never been obvious how to get off moderation (and thus replies I make can sometimes be in limbo for days, which should not to be taken as a dig at the moderator(s), but is just a fact of life).
I have a vague feeling that it may be because I either subscribed with my "raw" email address of simon@nosher.demon.co.uk way back when, or that ALUG's mailman is seeing this is a different address from the simon@nosher.net I actually use as my from/reply-to. I did have a quick scan of the headers, but as both addresses legitimately appear as part of the chain it's hard to say.
Would I be best just to try re-subscribing, or I have I missed some obvious thing I'm meant to do...?
You're subscribed as alug at nosher.net. You probably want to post from that address, or subscribe the address you do want to post from (possibly marking it nomail if you are using the alug bit for sorting into a folder, though the List-Id header is probably better for that).
J.
Hi Simon,
At Thu, 25 Feb 2010 22:12:08 +0000, simon ransome wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Simon Ransome wrote:
By the way, although I've been subscribed to this list for several years (lurking, mostly) I have posted from time-to-time, and would probably post some more, except that it's never been obvious how to get off moderation (and thus replies I make can sometimes be in limbo for days, which should not to be taken as a dig at the moderator(s), but is just a fact of life).
I have a vague feeling that it may be because I either subscribed with my "raw" email address of simon@nosher.demon.co.uk way back when, or that ALUG's mailman is seeing this is a different address from the simon@nosher.net I actually use as my from/reply-to. I did have a quick scan of the headers, but as both addresses legitimately appear as part of the chain it's hard to say.
Would I be best just to try re-subscribing, or I have I missed some obvious thing I'm meant to do...?
You're being moderated with the message "Post by non-member to a members only list". So, yes, you need to make sure you're subscribed with the email address that goes in the From header of your messages.
Best, Richard
On Thu, Feb 25, 2010 at 10:12:08PM +0000, simon ransome wrote:
I have a vague feeling that it may be because I either subscribed with my "raw" email address of simon@nosher.demon.co.uk way back when, or that ALUG's mailman is seeing this is a different address from the simon@nosher.net I actually use as my from/reply-to. I did have a quick scan of the headers, but as both addresses legitimately appear as part of the chain it's hard to say.
Would I be best just to try re-subscribing, or I have I missed some obvious thing I'm meant to do...?
Neither of those email addresses are subscribed to the Alug mailing list, there is another address @nosher.net that is on the list.
The alug list is configured to only allow people to post from email addresses that are subscribed to the list this is to prevent spam.
If you want to post from an address that you do not want to receive list email then you subscribe from that email address and then set it in the web interface to "no mail" this then allows you to post from it without moderation.
As your email addresses aren't subscribed then all your posts get moderated which takes time as it happens when someone gets around to it.
Also, please create new threads instead of replying to an old one if the post is about a different or new subject!
Thanks Adam