- This topic has 15 replies, 2 voices, and was last updated 10 years, 1 month ago by
Tom.
-
AuthorPosts
-
September 19, 2015 at 12:49 am #137927
Oleg
Tom, tell me if this is possible. Apply CSS, only in the event that the page is displayed in another place by frame. Maybe with another plugin. I found a plug-in “Fresh Custom Code”, it allows you to set the conditional logic for displaying CSS, for example, post categories or mobile devices, but no frames.
September 19, 2015 at 11:18 am #138034Tom
Lead DeveloperLead DeveloperWhat do you mean by frames? IFrames?
September 19, 2015 at 12:59 pm #138053Oleg
Yes.
September 19, 2015 at 11:36 pm #138136Tom
Lead DeveloperLead DeveloperYou’d just put
iframein front of your CSS selectors.iframe .my-class { }September 20, 2015 at 1:01 am #138152Oleg
I try:
iframe { .site-header {display:none;} .site-info {display:none;} }does not work.
but is working
iframe { margin-top:50px; margin-left:0px; }but you need it – site-header, site-info
September 20, 2015 at 9:43 am #138233Tom
Lead DeveloperLead DeveloperIt would be:
iframe .site-header, iframe .site-info { display:none; }September 20, 2015 at 8:45 pm #138351Oleg
No, it does not work either. What could be wrong?
September 21, 2015 at 12:12 am #138378Tom
Lead DeveloperLead DeveloperI’m not sure – this is more of an HTML issue than a GP/WordPress issue.
The code I gave above will work if you have those elements (.site-header and .site-info) inside an iframe element (no idea why this would be the case).
Either way, you’ll need to either adjust your HTML or CSS.
September 21, 2015 at 8:21 am #138492Oleg
Tom, see for yourself.
Completely clean installation WordPress and GeneratePress.


Site: http://olegte.bget.ru/wp-admin/, login/password for admin – demo/demo.
September 21, 2015 at 10:13 am #138538Tom
Lead DeveloperLead DeveloperI’m not seeing that on this page?: http://olegte.bget.ru/iframe/
Have you removed it?
September 21, 2015 at 10:19 am #138541Oleg
No, there is only the name of the “IFRAME” and the word “text” in the content.
September 21, 2015 at 10:22 am #138542Tom
Lead DeveloperLead DeveloperJust looked it up – it’s not possible: http://stackoverflow.com/questions/3564466/how-to-hide-an-element-inside-html-iframe
September 21, 2015 at 10:26 am #138543Oleg
It says about the pages on a different domain. In my case the page on the same domain. ?
September 21, 2015 at 10:27 am #138544Tom
Lead DeveloperLead DeveloperThen why not just hide the site header and other elements on that site before embedding it in an iframe?
From what I’ve read, it’s not possible to apply CSS to the contents of an iframe.
September 21, 2015 at 10:32 am #138545Oleg
I want to make sure that the page can be opened from another location in the pop-up window, in an abbreviated form.
-
AuthorPosts
- You must be logged in to reply to this topic.