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