css-styles are overwritten by beez

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Locked
NeoAnderson1982
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Wed Aug 01, 2007 3:32 pm

css-styles are overwritten by beez

Post by NeoAnderson1982 » Thu Aug 02, 2007 9:51 am

Hi there.
First of all, congratz, beez is the very best template for J!1.5 RC1.
I'm writing a component for J!.
For that, I need special styles, e.g. a red heading.
I defined the css-file (/components/com_comname/assets/css/tmpl.css) and in there

Code: Select all

#exerciseheading { color: #f00; text-decoration: line-through; }. In the /components/com_comname/views/one/tmpl/default.php I 
included it with

Code: Select all

$document   =& JFactory::getDocument();
$document->addStyleSheet(JPATH_COMPONENT.DS.'assets'.DS.'css'.DS.'tmpl.css');
and

Code: Select all

<h1 id="exerciseheading"><?php echo $name; ?></h1>
When I open now the view of the component, the text-deco is applied to the heading, but not the color. The same happens to other defined pieces with for example.

How can I change such things?

Greetz and thanks for your help
Aljoscha Peters

User avatar
rdeutz
Joomla! Explorer
Joomla! Explorer
Posts: 364
Joined: Thu Aug 18, 2005 6:50 am
Location: Germany - Aachen
Contact:

Re: css-styles are overwritten by beez

Post by rdeutz » Sat Aug 04, 2007 8:49 am

Hi,

I think your style is overwritten from a high-ordered Style. We use in beez context selector and it is possible that this is the reason for your problem. Do you have an firefox installed ? If yes, you should use the DOM inspector and take a look at the css-styling roules. Then you get the information which style overwrites your style. I think this style has an more detailed path as you style

e.g.

#main #content h1 <- Style in beez

#exerciseheading  <- your style

then you must change your style definition to

#main #content #exerciseheading
Best Regards, Robert
My Blog: http://www.robert-deutz.de - follow me on twitter @rdeutz
Professional Services for Joomla! http://rdbs.de - follow on twitter @rdbsnews


Locked

Return to “Templates for Joomla! 1.5”