[pmwiki-devel] CSS whiz needed...

Hans design5 at softflow.co.uk
Thu May 17 14:27:04 CDT 2007


Thursday, May 17, 2007, 7:45:00 PM, The Editor wrote:

> Thanks bunches for both links.  Very helpful.  But neither seem to
> give a list of what style attributes can be assigned to which html
> markups.  Ex: can you put a border around a <p>? Does float mean
> anything in a span--or is it only for divs? etc.

There is the slight problem of not knowing quite what you wish to
know... as your original listing mixes css properties with html
attributes.

For XHTML attributes see the common attributes:
http://www.htmldog.com/reference/htmltags/commonattributes/

If you use css HTML-selectors like in

p { border:1px solid red; }

span { background: yellow; }

then not all properties you assign to a selector will make sense.
I don't know if there is a list for this.
But you can assign a border to a paragraph.
But 'float' is used with block elements, not inline elements.
Generally you can assign lots more properties to HTML selectors in css
than you could use coresponding attributes in old fashioned HTML.

Note also that many HTML attributes are deprecated in XHTML, so you
should not use a XHTML tag with align='left' for instance, but handle
this using css selectors and setting a text-align=left property, via
class, an id or a html selector.

See about selectors:
http://www.westciv.com/style_master/academy/css_tutorial/selectors/index.html


  ~Hans




More information about the pmwiki-devel mailing list