I seem to suffer from this all the time, too much space between headers and the things underneath them.
... and I've simplified it down to the following:-
I have the following HTML:-
<p> Paragraph1 </p>
<p> Paragraph2 </p>
In the CSS I have:-
p { background: blue; padding-bottom: 0; margin-bottom: 0px; margin-top: 0; padding-top: 0; }
(The background: blue; is just to prove it's being acted on)
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
On 17 Mar 22:22, Chris G wrote:
I seem to suffer from this all the time, too much space between headers and the things underneath them.
... and I've simplified it down to the following:-
I have the following HTML:-
<p> Paragraph1 </p> <p> Paragraph2 </p>
In the CSS I have:-
p { background: blue; padding-bottom: 0; margin-bottom: 0px; margin-top: 0; padding-top: 0; }
(The background: blue; is just to prove it's being acted on)
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
Huh? What white space...
http://miranda.sommitrealweird.co.uk/~brettp/temp/splat/test.html
Are you actually showing us all the relevant data?
On Thu, Mar 18, 2010 at 09:30:44AM +0000, Brett Parker wrote:
On 17 Mar 22:22, Chris G wrote:
I seem to suffer from this all the time, too much space between headers and the things underneath them.
... and I've simplified it down to the following:-
I have the following HTML:-
<p> Paragraph1 </p> <p> Paragraph2 </p>
In the CSS I have:-
p { background: blue; padding-bottom: 0; margin-bottom: 0px; margin-top: 0; padding-top: 0; }
(The background: blue; is just to prove it's being acted on)
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
Huh? What white space...
http://miranda.sommitrealweird.co.uk/~brettp/temp/splat/test.html
Are you actually showing us all the relevant data?
Obviously not but the question was rather to find out what else could be affecting it. It's in a Wiki and thus there's a whole superstructure of 'stuff' around this. Presumably there's some CSS overriding what I have but I really can't understand what given that the above is an exact extract from the HTML (viewed with 'Show Source' in Firefox) and I see two paragraphs with a blue background and white space in between.
I probably only want to change the spacing locally so what I'm really after is a way to tell those particular paragraphs not to have any space between them. I can *probably* wrap it all in a <div> and/or add a class to the paragraphs.
Chris G wrote:
On Thu, Mar 18, 2010 at 09:30:44AM +0000, Brett Parker wrote:
On 17 Mar 22:22, Chris G wrote:
I seem to suffer from this all the time, too much space between ... and there's still a great wide white space between the two
Obviously not but the question was rather to find out what else could be affecting it. It's in a Wiki and thus there's a whole superstructure of 'stuff' around this. Presumably there's some CSS overriding what I have but I really can't understand what given that the above is an exact extract from the HTML (viewed with 'Show Source' in Firefox) and I see two paragraphs with a blue background and white space in between.
I probably only want to change the spacing locally so what I'm really after is a way to tell those particular paragraphs not to have any space between them. I can *probably* wrap it all in a <div> and/or add a class to the paragraphs.
You could wrap it in a div with a unique classname and do
div.myUniqueClassName p { background: blue; margin: 0; padding: 0 }
<div class="myUniqueClassName"> <p>Stuff</p> <p>More stuff</p> </div>
Or you could just use in-line style which, apart from a few rules governing relative importance of styles (like for anchors), is guaranteed to override any style declared higher up. It's not hugely scalable, in that you wouldn't really want to do it for things you're trying to do on a site-wide basis, but might fix your immediate problem:
<p style="margin:0; padding: 0; background: blue;">stuff</p> <p style="margin:0; padding: 0; background: blue;">more stuff</p>
Simon
On Thu, Mar 18, 2010 at 09:34:23AM +0000, Marcus Harris wrote:
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
It looks like something else is affecting it than this, so please provide a link to the page in action, if you can.
OK, I've chopped the sample down to the minimum and you can find it here:-
http://home.isbd.net/boatWiki/doku.php?id=playground
It will ask for a login before you actually get there, name guest, password the same.
Sorry about all the red backgrounds! :-)
On 18 Mar 10:13, Chris G wrote:
On Thu, Mar 18, 2010 at 09:34:23AM +0000, Marcus Harris wrote:
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
It looks like something else is affecting it than this, so please provide a link to the page in action, if you can.
OK, I've chopped the sample down to the minimum and you can find it here:-
http://home.isbd.net/boatWiki/doku.php?id=playground
It will ask for a login before you actually get there, name guest, password the same.
Sorry about all the red backgrounds! :-)
Right - see, and this is why people need to install firebug and learn how to use it...
div.dokuwiki p, div.dokuwiki blockquote, div.dokuwiki table, div.dokuwiki pre { margin:0 0 1em; }
is the bit that's "overridding" your style. In particular: div.docuwiki p
Is the matching part.
You could try adding a rule such as: div.docuwiki div#content div#page.page p { margin: 0; }
But it's hard to tell what else is going to affect it.
Of course, paragraphs *should* have white space between them, for readability... but hey...
On Thu, Mar 18, 2010 at 10:29:04AM +0000, Brett Parker wrote:
On 18 Mar 10:13, Chris G wrote:
On Thu, Mar 18, 2010 at 09:34:23AM +0000, Marcus Harris wrote:
... and there's still a great wide white space between the two paragraphs. How can I get rid of it?
It looks like something else is affecting it than this, so please provide a link to the page in action, if you can.
OK, I've chopped the sample down to the minimum and you can find it here:-
http://home.isbd.net/boatWiki/doku.php?id=playground
It will ask for a login before you actually get there, name guest, password the same.
Sorry about all the red backgrounds! :-)
Right - see, and this is why people need to install firebug and learn how to use it...
div.dokuwiki p, div.dokuwiki blockquote, div.dokuwiki table, div.dokuwiki pre { margin:0 0 1em; }
is the bit that's "overridding" your style. In particular: div.docuwiki p
Is the matching part.
I need to learn more about CSS rules on what overrides what! Thank you. (I'll take a look at firebug, sounds useful)
You could try adding a rule such as: div.docuwiki div#content div#page.page p { margin: 0; }
But it's hard to tell what else is going to affect it.
Of course, paragraphs *should* have white space between them, for readability... but hey...
Absolutely, but in this case I'm simply trying to get a heading to nestle closely above a table, I quite agree that paragraphs should have space between them.
On 18-Mar-10 13:15:58, Chris G wrote:
On Thu, Mar 18, 2010 at 10:29:04AM +0000, Brett Parker wrote:
On 18 Mar 10:13, Chris G wrote:
On Thu, Mar 18, 2010 at 09:34:23AM +0000, Marcus Harris wrote:
[...]
[...]
[...]
Of course, paragraphs *should* have white space between them, for readability... but hey...
Absolutely, but in this case I'm simply trying to get a heading to nestle closely above a table, I quite agree that paragraphs should have space between them.
-- Chris Green
Should? Not necessarily, Chris! There are several ways of meking one paragraph nicely distinct from another, depending on the paragraph style. The simplest of these is the plain old indented first line of the paragraph, of course, which I am laboriously and with tongue in cheek typing now. I don't know (not being an HTML author) to what extent one can arrange this kind of thing in HTML. Perhaps it looks too much like yukky old printing on paper for the modern eye.
Now, having put off a necessary going-out as long as I could, I'm off (Oh b****r, I have to put a linespace above this one).
Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 18-Mar-10 Time: 14:43:31 ------------------------------ XFMail ------------------------------
On Thu, Mar 18, 2010 at 02:43:34PM -0000, Ted Harding wrote:
On 18-Mar-10 13:15:58, Chris G wrote:
On Thu, Mar 18, 2010 at 10:29:04AM +0000, Brett Parker wrote:
On 18 Mar 10:13, Chris G wrote:
On Thu, Mar 18, 2010 at 09:34:23AM +0000, Marcus Harris wrote:
[...]
[...]
[...]
Of course, paragraphs *should* have white space between them, for readability... but hey...
Absolutely, but in this case I'm simply trying to get a heading to nestle closely above a table, I quite agree that paragraphs should have space between them.
-- Chris Green
Should? Not necessarily, Chris! There are several ways of meking one paragraph nicely distinct from another, depending on the paragraph style. The simplest of these is the plain old indented first line of the paragraph, of course, which I am laboriously and with tongue in cheek typing now. I don't know (not being an HTML author) to what extent one can arrange this kind of thing in HTML. Perhaps it looks too much like yukky old printing on paper for the modern eye.
It wasn't me said "paragraphs *should* have white space between them"!
I do think that computers have changed the way we lay out text though, as you say indenting of the first line of paragraphs seems to have just about disappeared except in books.
My pet hate is defaults that set spacing *below* headers wider than spacing above headers so that (to my mind) they attach themselves to the paragraphs above rather than the ones below that they belong to.
Now, having put off a necessary going-out as long as I could, I'm off (Oh b****r, I have to put a linespace above this one).
Ted.
E-Mail: (Ted Harding) Ted.Harding@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 18-Mar-10 Time: 14:43:31 ------------------------------ XFMail ------------------------------
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!