I'm using Lightbox2 to display a node within a Lightbox iframe popup (using rel="lightframe" within a link).
Is there a way to pipe CSS into this iframe so I can style the contents the way I want them?
(I actually don't understand why using a rule like iframe body {font-size:1em} doesn't work, but that's just me being stupid... :-/)
I'm guessing I need to run a JavaScript function after the Lightbox has loaded that will add the CSS. Will that work?
To begin with styling an iframe is a little headache, or at-least that is what my designer told me ;)
The easiest solution would be to add the styles directly in the template of the node type that you are trying to display in lightbox. This would work if you lightbox is the only place where you are displaying that node.
This is a working solution but not an elegant one. Would appreciate if somebody can come with a more elegant solution.
Related
I'm just starting my programming but I need help.
I built my site from wordpress template. Made a lot of customization on my own but I have trouble by creating BURGER MENU on mobile devices.
I'm not sure how I can rewrite chosen template navigation bar menu to burger. Let me know if anyone could help me.
You could do it a few different ways, but personally, it's easier to place it with javascript and hide it with css...
Usually, you would create an element with javascript and attach it to a location on your page. For the burger itself, you've got the option of using drop-shadows, three divs or the unicode character for it. You can read more about those options here: https://css-tricks.com/three-line-menu-navicon/
Finally, if you want to add animation to your menu items (for opening / closing ) here's something that you can read to understand how it's possible to achieve: https://jonsuh.com/hamburgers/
I am building an autoresponder for my own website. I thought to put it inside an iframe to decouple it's style from the theme style (i'm on wordpress), but this gives me two collateral effects.
The first one is that the iframe is not much friendly with the responsiveness, and I'm trying to address it's behaviour to always show the content of the autoresponder.
the second one is that the form inside the iframe has a "thank you" page after the submit, but with the iframe the thank you page will open inside the iframe.
There is a way to open the thank you page on the host page? Am I doing this the right way? there is maybe a better way to insert a piece of web page in a way that stay indipendent from the theme around it?
I wouldn't use an iframe to de-couple styling to be honest, they can prove far more trouble than they are worth.
I would just override any theme styles I didn't want with CSS targeted at the component. It sounds a lot more involved than it actually would be and you'd have better control over the responsive layout of the component.
I am rewriting an app using AngularJS. The tabs have a certain styling that I don't want to change. But upon using ui-router, specifically replacing "href" with "ui-sref", the look of navigation tabs gets messed up because I think the JavaScript and CSS is defined for "href".
I tried replacing all instances of href with ui-sref but that didn't work.
I've looked into Bootstrap but I need to render new pages upon clicking the tabs, not display data already on the page but hidden. Like Bootstrap does.
Can someone please suggest me what to do? How to modify the current styling or maybe suggest some other css template that I can use only for the navigation tabs? Thanks in advance!
Twitter seems to have removed most of the ability to styling the widgets. But thing is I keep seeing websites with custom widgets. Is there any way to still do it? I saw a tutorial on taking the JS and the CSS and placing it on your own server. It doesn't seem to work that way anymore, though. Does anyone have a clue on how to do this? I need my widget to fit the theme of my website perfectly.
I'm talking about like removing the widget header, hide pictures from the feed, etc.
This JS snippet will let you add custom CSS styles to the Twitter embed widget: https://github.com/kevinburke/customize-twitter-1.1
I have one web page in ASP.NET and I want that page to be disabled until the whole page loading process gets completed.
One way is to activate a lightbox without content that will dim the whole page and then on the body onload event hide that lightbox.
Lightbox is a like having a modal window above the original window, and is used to preview pictures and other content. It could easy be modified to do what you want. Just activate a lightbox with no content and then hide the lightbox when the document is loaded.
This is a strange requirement and I would be interested in finding out your reason for doing this. Is there a problem or error that is ocurring. Perhaps you think the best way to prevent the error is to freeze the UI until the page loads.
I think that you should edit your question and describe what the underlying issue is. There might be a better way to improve your page.
I've seen this done with a simple overlay before.
Basically an iframe and a div that covers the page and has a high z-index is output at the beginning of page render. This is styled so it greys the page out and it also makes everything non-clickable. Then, once the page is loaded, a simple bit of javascript can be used to remove the div and iframe (or just set their styles to make them disappear).
I've also seen people attempt this issue by manually iterating over all controls on the page in JavaScript and disabling them. This is a horrible way to attempt it :)
The jQuery BlockUI plugin is another good option with lots of customization options.