[Gllug] css question

Daniel P. Berrange dan at berrange.com
Mon Dec 5 18:01:26 UTC 2005


On Mon, Dec 05, 2005 at 06:47:45PM +0100, Martin A. Brooks wrote:
> 
> I'm no web designer, and my CSS skills are miserable.  I wondered if 
> someone here could help me do something very simple.
> 
> For each question-answer pair in the FAQ 
> (http://www.hinterlands.org/gllugfaq/) I would like to add a little 
> space after the answer text.  This must be done as part of a stylesheet, 
> I can't control the exact content.
> 
> I'm most likely being slow, but I can't seem to hit on the right CSS 
> voodoo to get what I want. Any ideas?

Not really answering your question, but one useful tip when trying to
figure out just which HTML element(s) to apply a CSS rule to, is to 
put a border around each element. eg, at the top of your master CSS
file add:

  * {
    border: 1px solid black !IMPORTANT;
    margin: 1px !IMPORTANT;
    padding: 1px !IMPORTANT;
  }

Even better is to register a 2nd CSS file to the page. So if you
currently have:

   <link rel="StyleSheet" href="/styles/main.css" title="Main style" type="text/css">

Then, add an alternate style sheet:

   <link rel="Alternate StyleSheet" href="/styles/main-debug.css" title="Debug Main style" type="text/css">

And in main-debug.css simply include 'main.css' thus:

   @import url(default.css);

   * {
     border: 1px solid black !IMPORTANT;
     margin: 1px !IMPORTANT;
     padding: 1px !IMPORTANT;
   }

So, when something wierd goes on with layout you can just use your
browser (View->Styles->Debug main style) to switch to alternate CSS 
to debug it

Regards,
Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20051205/e77269e0/attachment.pgp>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list