css2 allows you to change the rule applied to an element according to the context in which you find it. eg. a rule in the form:

li em { ... }

affects only em tags that are immediately contained by li tags. usefully, it works with ids as well as classes. If your original problem is that the formatting needed for the whole page is wrong for one or two elements in the header, then something in this form might work:

p { padding: 10px; ... } #header { border 1pt solid black; ... } #header p { padding: 0; ... }

or it might not. You know. Just in case.

All of which is heading pretty energetically away from the topic, but we could call it the mcfly method: travel back in time far enough and change something to make the problem go away :)


In reply to an aside about css that might help by thpfft
in thread Create and get rid of frames page with Perl by tachyon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.