Remove class from div

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Oct 16, 2013 11:35 pm
I need to remove the gkpage class from the content div in the creativity template where can this be accomplished? I did not see an instance in the phps, but maybe I overlooked it. Thanks
User avatar
Fresh Boarder

GK User
Thu Oct 17, 2013 7:44 am
Which template?
User avatar
Moderator

GK User
Thu Oct 17, 2013 9:16 pm
creativity
User avatar
Fresh Boarder

GK User
Fri Oct 18, 2013 3:52 pm
On homepage or on every page?
User avatar
Moderator

GK User
Fri Oct 18, 2013 4:17 pm
the home page
User avatar
Fresh Boarder

GK User
Fri Oct 18, 2013 4:54 pm
Could You please post an url to your site?
Also - why would You like to remove that class? Perhaps overriding some settings in css would be a better solution?
User avatar
Moderator

GK User
Fri Oct 18, 2013 7:26 pm
the gkpage class specifically prevents the content div from extending to the edges of the window, which I need images to be responsive to the full size of the window. I am pming you the url
User avatar
Fresh Boarder

GK User
Fri Oct 18, 2013 9:41 pm
Then instead try putting this into override.css:
Code: Select all
body.onepage div.content {
    max-width: 100% !important;
    width: 100% !important;
}
User avatar
Moderator

GK User
Fri Oct 18, 2013 11:04 pm
Thanks but id prefer not to override it, Id like to just not inject the gkpage class at all into the content div. If you could just tell me what file injects the gkpage class into the content div that would be great
User avatar
Fresh Boarder

GK User
Sat Oct 19, 2013 9:12 am
Editing core files is not a good solution - whenever You will like to update the template, You will need to make all changes again. Using override.css allows You to copy only one file and then replace it after update.
User avatar
Moderator

GK User
Sat Oct 19, 2013 5:48 pm
regardless, I would really like to know the location of this. If someone could please inform me, thank you
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 12:52 am
This is keeping me from completing a very important project, so I really need to know how to go about it by removing the instance not overriding it as soon as possible thanks
User avatar
Fresh Boarder

GK User
Sun Oct 20, 2013 9:23 am
Overriding is the only way You can do that. Removing this class from only one module is impossible.
Removing this class from entire site will break layout.
Overriding is standard solution and there is no point not to use it.
User avatar
Moderator

GK User
Mon Oct 21, 2013 2:48 pm
Cyberek, I beg to differ. I have done this many times before. I dont need your opinion on this, If you will I just need to know where this is injected. This back and forth has wasted 5 days of my projects time, now please let me make my own decisions on how to create my website, and give me the information I requested. Or do I have to upgrade to a developer license just to find out where one div class is injected?
User avatar
Fresh Boarder

GK User
Mon Oct 21, 2013 3:20 pm
As I have written before, You cant remove it from only one element.
If You want to strip entire site from this class, You can edit:
templates/creativity/html/modules.php
Code: Select all
if($module->showtitle) {   
         if($params->get('module_link_switch')) {
            echo '<h'.$header_type.' class="header'.($onepage ? ' gkPage' : '').'"><a href="'. $params->get('module_link') .'">'. preg_replace('/__(.*?)__/i', '<small>${1}</small>', $module->title) .'</a></h'.$header_type.'>';
         } else {
            echo '<h'.$header_type.' class="header'.($onepage ? ' gkPage' : '').'">'. preg_replace('/__(.*?)__/i', '<small>${1}</small>', $module->title) .'</h'.$header_type.'>';
         }
      }

which adds gkPage to h1 elements of Joomla modules, and:
Code: Select all
if($clear_mode == false) echo '<div class="content'.($onepage ? ' gkPage' : '').'">';

that adds gkPage to content of module if current page has class/suffix onepage.
User avatar
Moderator

GK User
Mon Oct 21, 2013 6:25 pm
thank you very much
User avatar
Fresh Boarder

GK User
Mon Oct 21, 2013 6:56 pm
No problem, I hope this is what You were looking for.
User avatar
Moderator

GK User
Mon Oct 21, 2013 7:44 pm
Cyberek, niether editing the module.php or using your override work.

To reproduce what I am explaining, use firebug and open my site.

Go down to to <div class="content gkPage">

Remove " gkpage" so it is <div class="content">

And NSP images go to full screen, otherwise it will not go to full screen
User avatar
Fresh Boarder

GK User
Mon Oct 21, 2013 8:08 pm
I was able to accomplish desired result with jquery only.

I added the following to the bottom of the gkscripts js file

jQuery('.content').removeClass('gkPage');
User avatar
Fresh Boarder

GK User
Tue Oct 22, 2013 5:58 pm
Could You explain me why You accept using jQuery to remove class (which will work with delay) and don't accept using css to change styling of particular element (and that does exactly the same just faster)?
Perhaps there is a good reason, but I can't see it basing on the things You write.
User avatar
Moderator

GK User
Tue Oct 22, 2013 9:37 pm
I would prefer css over jquery, however the css you gave me didnt work. The best solution would be to move the content div outside of hierarchy of the gkpage class but since youve attached the php to the onepage class it does not work either
User avatar
Fresh Boarder

GK User
Thu Oct 24, 2013 5:52 pm
Ok, the css code works... Stay with me and don't be angry... It works, but You have an error in override.css that prevents styles under the error to work:
Code: Select all
.gkTestimonials figcaption {
   background: transparent url('../images/testimonial_quote.png') no-repeat right
   
.bigtitle {

}


As You can see:
.gkTestimonials figcaption
is not closed and there is missing ";" at its end :).
Hope this will help more :)
User avatar
Moderator

GK User
Fri Oct 25, 2013 7:43 pm
Not angry, thanks for pointing out that error cyberek
User avatar
Fresh Boarder

GK User
Sat Oct 26, 2013 1:30 pm
Does it work the way You expected now?
User avatar
Moderator


cron