lbuelvas Posted January 27, 2019 Share Posted January 27, 2019 Hi, i'm having trouble trying to make the background of my web app, i made a html file to write the code and when i open it with chrome it displays my background as intended(using a gradient), but when i take the code and put it in my UniHTMLframe, the background is just plain white, hope you can help me, thanks. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2019 Share Posted January 28, 2019 Hello, Sorry, can you please explain in more details? Quote Link to comment Share on other sites More sharing options...
lbuelvas Posted January 28, 2019 Author Share Posted January 28, 2019 6 hours ago, Sherzod said: Hello, Sorry, can you please explain in more details? in my HTMLframe component i wrote my view, all shows fine, the css in the divs works well, but the body background color is always white, in fact i tryed changing the body background color with JavaScript but didn't worked, but then i resized the page in chrome and i could see something like this (see image below), like if HTMLframe body background color couldn't be affected by JS or CSS, but behind the rendered component the modification actually occured. when i execute the same Javascript to change the color with the same HTML code in a .HTML file executed with chrome, it works as intended, i.e. all the background turns red. this is the code i'm using in my html file, everything works except for the background stuff: .body{ height: 100%; margin: 0; background-repeat: no-repeat; background-attachment: fixed; background-image: linear-gradient(#E2FFA3, #C5DE8E); max-height: 100%; top: 100px; position: static; font-family: "helvetica"; (won't work with plain colors or gradients) hope you can help me, thanks for your time. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 28, 2019 Share Posted January 28, 2019 Hello, Sorry, if I understand you correctly, you can use bodyCls of the LayoutConfig... 1. UniHTMLFrame -> LayoutConfig -> bodyCls = myframe 2 CustomCSS: .myframe { height: 100%; margin: 0; background-repeat: no-repeat; background-attachment: fixed; background-image: linear-gradient(#E2FFA3, #C5DE8E); max-height: 100%; top: 100px; position: static; font-family: "helvetica"; } Quote Link to comment Share on other sites More sharing options...
lbuelvas Posted January 28, 2019 Author Share Posted January 28, 2019 1 hour ago, Sherzod said: Hello, Sorry, if I understand you correctly, you can use bodyCls of the LayoutConfig... 1. UniHTMLFrame -> LayoutConfig -> bodyCls = myframe 2 CustomCSS: .myframe { height: 100%; margin: 0; background-repeat: no-repeat; background-attachment: fixed; background-image: linear-gradient(#E2FFA3, #C5DE8E); max-height: 100%; top: 100px; position: static; font-family: "helvetica"; } Oh thanks, it worked. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.