Support Forum

  • Page:
  • 1

to change the inline styling of the answer class?

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I would like to change the css of the answers to this:

display:block;
font-style:italic;
margin-bottom:14px;
margin-left:20px;
margin-top:8px;

But there's no apparent rule in the css file, all I see is this: <div class="answer3" style="display: block;">

Please advise?
  • dax702's Avatar
  • dax702
  • Free Extensions
  • 5 posts
  • Karma: 0
The administrator has disabled public write access.
Hey again,

You can add the style to the module itself or the template if you wish.
First we will need to alter the module in order to target the answer divs

in the file /modules/mod_jbfaq/tmpl/default.php

alter line 22
<div class="answer<?php echo $id ?>"><?php echo $item->introtext; ?>

and make it
<div class="answer<?php echo $id ?> answer"><?php echo $item->introtext; ?>

The following style can be added to either the template_css.css stylesheet
or /modules/mod_jbfaq/faq/faq.css

div.answer{
display:block;
font-style:italic;
margin-bottom:14px;
margin-left:20px;
margin-top:8px;
}

I haven't tried this out so let me know how it works for you.

Cheers,
Jason.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
You're a genius, I don't know what I did, but just followed your instructions and it worked, thanks!
  • dax702's Avatar
  • dax702
  • Free Extensions
  • 5 posts
  • Karma: 0
The administrator has disabled public write access.
:) glad that worked for you.
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.
Hi i've been trying to style the answer class as well, and I modified the module like you suggested but i'm not seeing any results. Silly question but, in css to style answer its just .answer, right? I'm still pretty new at all this, sorry :P . I thought maybe because i'm not calling it right, maybe that's why I can't see any differences. Losing my mind, LOL! Please help :laugh:
  • Iana's Avatar
  • Iana
  • Free Extensions
  • 2 posts
  • Karma: 0
The administrator has disabled public write access.
Hi Lana,

Sometimes you may need to specificy the parent div too depending on the template you are using.

Got a link?

Anthony
  • Anthony Olsen's Avatar
  • Anthony Olsen
  • LIfetime Developer - Big Bamboo
  • 23925 posts
  • 788 Thanks
  • Karma: 433
The administrator has disabled public write access.
That's exactly what I did, and it ended up working :cheer: Thanks!!!!
  • Iana's Avatar
  • Iana
  • Free Extensions
  • 2 posts
  • Karma: 0
Last Edit: 14 years 2 months ago by Iana.
The administrator has disabled public write access.
Nice work Lana :)
  • Jason D's Avatar
  • Jason D
  • 6 Month Developer
  • 2957 posts
  • 12 Thanks
  • Karma: 75
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers