Custom html module + CSS - Joomla! Forum - community, help and support


hi!

i designed custom css in dreamweaver, , i'm having trouble implementing custom html module in joomla. don't know how apply css stylesheet. tried inline css, didn't work.

can help?

inline css should work, there way insert head using third party extension sourcerer http://extensions.joomla.org/extensions/5051/details

you'll need use appropriate plugin code insert this, here need insert css head of document:

first, you'll need access document object, done code:
$doc=jfactory::getdocument();

second, you'll create variable contains css:
$style='<style>#modname {background-color:#ff00ff;}</style>';

third, you'll insert style document head using document object created earlier:
$doc->addcustomtag($doc->params->get($style));

put together, should this:

code: select all

{source}
<?php
$doc=jfactory::getdocument();
$style='<style>#modname {background-color:#ff00ff;}</style>';
$doc->addcustomtag($doc->params->get($style));
?>
{/source}


enjoy!





Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい