[Pmwiki-users] Styling 'simple' tables
Ciaran
ciaranj
Wed Dec 8 04:12:54 CST 2004
Thanks for your response :) I'm well aware of the CSS approach, which
is great, but I'd like to set it up so that my wiki users can
pre-select styles of tables easily, some mechanism of specifying the
class of a simple table may work.. such as || class="tablestyleNormal"
etc. etc. .... But My problem is that first-child issue I guess, is
there a workaround for this for IE etc ?
- ciaran
On Tue, 7 Dec 2004 17:37:59 -0500, Bronwyn Boltwood <arndis at gmail.com> wrote:
> On Wed, 1 Dec 2004 09:44:59 +0000, Ciaran <ciaranj at gmail.com> wrote:
>
>
> > Hi, Is there an easy way to apply a default style to the simple
> > tables. (Pmwiki1)
> > I'd like to be able to default the style to be a font size smaller,
> > and the first row's background to be grey for example. I can easily
> > build tables like this with the advanced tables stuff, by my users are
> > reticent to use this! :(
> >
> > Any ideas? have I missed something patently obvious :)
>
> CSS, my dear, CSS. :) You'll need the page source, or better yet,
> access to the template, so that you can write the correct CSS
> selectors. The selectors need to be specific enough that they *only*
> select the bits you want. My site uses a template with no tables,
> except for ones added by content, and the content lives in <div
> id="wikitext"></div>. Therefore, I can use this CSS, with descendant
> (#wikitext table) and first-child (tr:first-child) selectors:
>
> #wikitext table {font-size: 85%;} /* smaller font size in tables */
> #wikitext tr:first-child {background: #ccc;} /* light grey background
> for the first row of the table -- but only in modern browsers, like
> Firefox and Opera. Internet Explorer for Windows does NOT understand
> :first-child. */
>
> If I wanted to get fancier with my table headers, I could write:
> #wikitext tr:first-child {background: #ccc; font-size: 90%;
> font-weight: bold;} /* table headers have light grey backgrounds and
> bold font which is smaller than the page text but bigger than the
> table text. */
>
> The method to add this CSS will vary according to the template. If
> it's already got a stylesheet which you can make changes to, you can
> just drop it in there.
>
> If you want or need to learn more, I strongly recommend
> http://westciv.com/style_master/academy/css_tutorial/index.html as a
> definitive guide.
>
> Bronwyn
>
--
- Ciaran
More information about the pmwiki-users
mailing list