[pmwiki-users] css background-image positioning

Hans design at flutesong.fsnet.co.uk
Fri Jul 29 08:52:33 CDT 2005


I posted this to the wrong address, here it is again:

You need to define the background images via css or a $HTMLStyles
declaration in config.php, for instance:
Place your images in pub/images/:

$HTMLStylesFmt[] = "
    .bg1 { 
        background-image:url(\$PubDirUrl/images/backgr1.jpg);
        background-color:#efd; }\n
    .bg2 {
        background-image:url(\$PubDirUrl/images/backgr2.jpg);
        background-color:#edf; }\n
    .bg3 {
        background-image:url(\$PubDirUrl/images/backgr3.jpg);
        background-color:#fde; }\n
    ";

give a background color close to the image color, as an alternative
for browsers which don't show images.

Then use the classes bg1, bg2, bg3 in divisions or tables in your wiki
page, like:

>>bg1<<
text content of div 1
>><<

or
(:div class='bg2' style='position:absolute; top:100px; left:400px;
 border:1px dotted black;  padding: 5px;':)
Content which goes on the absolute layer.
(:divend:)

or
(:table class='bg3' cellpadding=5px;':)
(:cell:)
Content which goes in the table cell.
(:tableend:)


Best, 
~Hans                           






More information about the pmwiki-users mailing list