J!Extensions Store™
Forum
Welcome, Guest
Please Login to access forum.
Re:Can't overrid CSS in iframe (1 viewing) 
Go to bottom
TOPIC: Re:Can't overrid CSS in iframe
#2616
Erick Paulino
Fresh Boarder
Posts: 8
User Offline
[SOLVED]Can't overrid CSS in iframe Karma: 0  
Hello,

I have tried to fix this by myself, but I will need your help. I can't overrid the CSS for the module that loads jmap because it is in an iframe. What I want to do is to reduce the spaces shown below:



I have tried to add the following class suffix on the module

Code:

.map-cursos { padding-top: 0px; padding-bottom: 0px; }
but it didn't work. The page is in the addresss below: https://www.docelimao.com.br/site/menu-do-assinante/cursos-online-ass/sucos-vivos-e-terapeuticos/281-aula-1/2226-video-aula-1.html Can you help me? Thank you
 
Logged Logged  
  The administrator has disabled public write access.
#2617
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Can't overrid CSS in iframe Karma: 79  
Hello Erick,

just looked at your site, to control the space for the sitemap module you can:

1. in the module setting choose 'Auto height' to 'No' and enter a specific height used for the iframe containing the sitemap

2. remove the extra padding contained in the css file of your template for the body thus reducing the top margin

See image.

John

 
Logged Logged  
  The administrator has disabled public write access.
#2618
Erick Paulino
Fresh Boarder
Posts: 8
User Offline
Re:Can't overrid CSS in iframe Karma: 0  
Hello,

I have already tried your 1st suggestion and that did not reduce the top margin. Removing the padding on my template, as in your 2nd suggestion, will change the whole site and that's not what I want. The problem is that the Iframe is realoading all my sites CSS and that's a problem.

Any other suggestion? Maybe I could change something in the module PHP file that loads the iframe, but I will need some guidance on this...

Thank you
 
Logged Logged  
  The administrator has disabled public write access.
#2619
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Can't overrid CSS in iframe Karma: 79  
About the 2nd suggestion it seems that changing the padding would affect only low resolutions being assigned to a media query.
However an alternative approach would be work on the file 'component.php' used to load the iframe contents that is placed in your template folder, it seems a T3 template in use. That file could have custom code for the appearance of the iframe contents.

John
 
Logged Logged  
  The administrator has disabled public write access.
#2622
Erick Paulino
Fresh Boarder
Posts: 8
User Offline
Re:Can't overrid CSS in iframe Karma: 0  
Hi John,

I have no idea how to do that. The problem is that by using iframe the module duplicates all my CSS. This is causing the excessive space on top. Is there a way to change the way the module generates the iframe content (https://www.docelimao.com.br/site/?option=com_jmap&view=sitemap&tmpl=component&jmap_module=208) or changing the module to use something different from an iframe?

Thank you
 
Logged Logged  
  The administrator has disabled public write access.
#2624
John Dagelmore
Admin
Posts: 3716
User Online Now
Re:Can't overrid CSS in iframe Karma: 79  
Yes this is normal, the template files are loaded normally.

Another approach would be using a template override for the default_html.php of JSitemap and evaluate the variable $isTmpl
When true it means that the sitemap is loaded inside the iframe and additional CSS styles can be added for example to remove paddings.

John
 
Logged Logged  
  The administrator has disabled public write access.
Go to top