I'm having a problem with a booking-widget. I have a stylesheet for my website but when I add the widget the style of the widget (fonts, size, spacing etc.) override the style on the site making it look awkward and even making the text not fit some boxes.
I don't have access to the widgets code so I'm going to have to work on what I have access to, ie the stylesheet. Any ideas what to do? And please speak to me as if you were trying to explain to a three year old, as I have only dabbled in c# and less in java, I have a basic understanding of how these things work and I pick stuff up quickly but I am still less then a novice.
Any help would be greatly appreciated.
Or something like this? `@inherits Umbraco.Web.Macros.PartialViewMacroPage
@{
Layout = null;
}
@if (@Model.MacroParameters["id"] != "") {
<script type="text/javascript">
var owner = "6C17DA5D-52D4-408A-BA5D-198BB39AC5E0";
var id = '@Model.MacroParameters["id"]';
var lang = '@Model.MacroParameters["lang"]';
var type = 'package'
var serverUrl = "///odinwebs-widgetfactory-test.azurewebsites.net/";
</script>
Thank you! That definitely got me on track! I have now found what is messing it up. Now to figure out how to fix it :) It seems like the setting of the widget (definitions of h1, h2, margins etc) is above the settings of the website (no idea if that is the right lingo but I hope you catch my drift). Now I just need to figure out how to reorder that so that the widget comes after the website. Thank you so much for your help!
Widget overrides style
I'm having a problem with a booking-widget. I have a stylesheet for my website but when I add the widget the style of the widget (fonts, size, spacing etc.) override the style on the site making it look awkward and even making the text not fit some boxes. I don't have access to the widgets code so I'm going to have to work on what I have access to, ie the stylesheet. Any ideas what to do? And please speak to me as if you were trying to explain to a three year old, as I have only dabbled in c# and less in java, I have a basic understanding of how these things work and I pick stuff up quickly but I am still less then a novice. Any help would be greatly appreciated.
Hi Ásta ,
it sounds like you're using a third party widget and there could be a number of things going on.
The most likely is that the widget has inline styles on the HTML:
Which will override the site site css.
Is there any way you can share the HTML code the widget outputs to the browser?
Thanks for taking the time to try to help me. Would it be this you are asking to see?:
If not could you point me in the direction of where I could find what you are asking for, again, talk to me like I am a three year old :)
Ásta
The code doesn't show the widget code.
Have you got a link to the code online anywhere?
I don't have access to the widget's code, it's locked away at Odin Software, the company that owns the widget.
Have you got a link to the documentation for the widget?
I wish I understood fully what you are asking, but this maybe? ///odinwebs-widgetfactory-test.azurewebsites.net/assets/build/site.ReleaseV2.js
Thanks again, I feel like a total dweeb lol, just trying to help my brother out launching his own company
Ásta
Or something like this? `@inherits Umbraco.Web.Macros.PartialViewMacroPage @{ Layout = null; } @if (@Model.MacroParameters["id"] != "") {
}` I'm fumbling around
Hi Ásta.
Do you by any chance also include a .css file related to the widgets?
I can see that the .js file is making some inline styling to the element it creates like:
I think the easiest way for you to see whats going on is to:
Run your website in Chrome.
Press F12.
Then click on "Select an element in the page to inspect in" In the element inspection tab.
Now click on an element that are affected by the "wrong styling".
Now you can see in the right side where the applied css is coming from.
If the styling that is wrong is inside (element.style), then its very likely that it comes from the .js file.
If not then it comes from an included css file and you can see wich one, unless its all bundled.
Thank you! That definitely got me on track! I have now found what is messing it up. Now to figure out how to fix it :) It seems like the setting of the widget (definitions of h1, h2, margins etc) is above the settings of the website (no idea if that is the right lingo but I hope you catch my drift). Now I just need to figure out how to reorder that so that the widget comes after the website. Thank you so much for your help!
is working on a reply...