Jump to content
anet

gradient fill for background?

Recommended Posts

anet

Hi, I am pretty new to wp and pagelines and css.

But I found a site to create the css for the gradient I want for the background to my site. Here's how I added it to Custom Css in Pagelines Lite.

 

But nothing shows up. So other than the actual gradient code, there must be something obvious Css-related I'm not doing. Anyone able to help? Thanks in advance. 

 

 

 

 
//** This gradient background code was created using this website: www.colorzilla/gradient-editor/ **//
 
.gradient-bg {
  
background: #bcd9f6; 
  
  /* Old browsers */
background: -moz-linear-gradient(left, #bcd9f6 0%, #0d3d57 89%, #0a2b3f 100%); 
  
  /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#bcd9f6), color-stop(89%,#0d3d57), color-stop(100%,#0a2b3f)); 
  
  /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* Opera 11.10+ */
background: -ms-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* IE10+ */
background: linear-gradient(to right, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
  
  /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#bcd9f6', endColorstr='#0a2b3f',GradientType=1 ); 
  
  /* IE6-9 */
 
}
  

Share this post


Link to post
Share on other sites
batman

Hi anet

 

Can you provide a link to your website please.

 

First you change 

.gradient-bg 

for

.canvas #page-canvas

 

And you see what's happen

;)


Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
anet

Hi, batman, here it is: http://www.lacctemp.lightoflearning.org/

I made the change you suggested. Gradient doesn't show up as background. I even removed the solid blue that is there (in Color Controls/Body Background), but still the Custom Css for gradient did not work. So I put the solid blue back in for now.

Edited by anet (see edit history)

Share this post


Link to post
Share on other sites
Danny

Hi,

 

Basically, the code you have above is for gradients. However, the code is not targeting anything like Batman suggested. You will need to use the like this:

 

#site .page-canvas {}

 

And then add your gradient code inside the {  }

For example,

 

#site .page-canvas {
background: -webkit-linear-gradient(left, #bcd9f6 0%,#0d3d57 89%,#0a2b3f 100%); 
}

 

I recommend you give our custom CSS documentation a read, as it will certainly assist you.

 

http://support.pagelines.me/docs/customization/custom-css/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
anet

Ninja, thank you so much. Obviously I'm a total noob at web dev and css. That works! 

Will spend significant time in the documentation you linked. Thank you!

Share this post


Link to post
Share on other sites
anet

UGh...now I wonder why? Why the dark band I created in my gradient shows up at different distances from the top of the web page when I go to different pages in my menu. Checked it briefly in IE 10, iPad, and Chrome. Same problem.

I actually had the same problem with a nice image I had made for the background. (Which I uploaded to imgur and used custom css to load as site background, those steps were no problem.)

 

But I really want to make a nice color/texture difference in the background area above the nav bar and below it. However, whether I create those spaces in a single background image or whether I do it in this test gradient with a dark 'bar', the portion of the image I want to hang just behind the nav bar moves up and down. I can't seem to see any reason for it.

This is a slightly different question...maybe it needs moved? But it is still a problem with my gradient.

Thanks in advance for anyone willing to dig and point me in the right direction (places to learn) for answers! :)

Share this post


Link to post
Share on other sites
James B

Each browser will render gradients differently depending on the browser. You could make a gradient images and apply that to the background. That way it would be the same in all browsers


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites
anet

Hi, James,

 

Thanks for your reply, but this is not a cross-browser problem. Just within Chrome for example, the 'dark bar' is at a different level depending on which page I go to via my navigation. It's the same problem whether the background is a custom css or a gradient image or an image. The image is not always in the same position in the background. Whether I load it in the site option color controls via wp media, or whether I host the image at a third site and do custom css to load it as background.

 

It's some problem with how pagelines is rendering background on different pages within the same site within the same browser.

 

Does anyone out there have a background with a horizontal area that stays in the same position in regard to each page, when using pagelines lite? This is a very weird problem for such a sophisticated theme.

Share this post


Link to post
Share on other sites
anet

Hi, catrina, that is the site in question; I removed the gradient background, since I didn't want to scare off my client! lol

 

If you're online now I'll put it back in, so you can have a look.  Let me know, thanks! 

 

 

 

[Mind you, this isn't the final look I want, but I do want to find out why the positioning of the background changes on some pages. It means I can't design any background, gradient or image, to work on my site if it has any elements that look best at a certain position from the top of the page...]

Edited by anet (see edit history)

Share this post


Link to post
Share on other sites
anet

Hello, all!

 

I guess catrina has been off-line since her comment.

 

I've managed to copy my site to a dev site, so I can make changes without scaring my client. Here's the dev site: http://www.laccdev.lightoflearning.org/

 
And I've uploaded a trial background with a horizontal element. Instead of doing this via custom css (as was required with the gradient fill), I set this as background image within the site options/color control page.  I also set it as 'fixed' instead of 'scroll'. And it's supersized.

 

Maybe it's because PageLines lite has had a few different upgrades since I last tried this, but now the problem is not there! Each page on the menu has the background image at the same distance from the top. Yay!!

 

SO...thread can be closed!

 

:)

Share this post


Link to post
Share on other sites
James B

Hi Anet,

 

Glad you got this working. Just checked your link and yes the image is displaying perfectly :-)


Kindly search the forum and read the documentation before posting. It will help you resolve many issues.

For CSS help be sure to check out W3Schools first and be sure to download FireBug for FireFox for troubleshooting.

James B

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Similar Content

    • glyph.marketing
      By glyph.marketing+
      Hello, I am having a problem similar to that experienced by Michael Kummer here. We have pages that show this automatic scrolling issue (examples here and here) and it is sufficiently annoying that we have seen customers bounce while trying to convert. Strangely, it only happens at specific resolutions, so it can be difficult to reproduce. In general we can only consistently reproduce it on a 4k resolution with a browser width between 1517 and 1536px. 
      Thanks to Michael Kummer's help we were able to set the overflow-anchor property to none in the entire body, which fixed the issue as far as we can tell, but also obviously disabled scroll anchoring for the whole site. I tried applying it to the specific element that looked like it was being reloaded, which was the PL Meganav extension, but that was unsuccessful. 
      Can anyone help us figure out which element or ID we can apply this property to, so that we can fix the scrolling issue but not disable scroll anchoring for the entire site?
      Thank you - 
      Glyph Language Services
    • chamois_blanc
      By chamois_blanc+
      Hello,
      Shouldn't the image PL5 component be using the srcset/picture css directives to pick the correct size for an image? or it does already and I don't know how to use it? Thank you for any advice or enlightenment.
    • Dan Haddock
      By Dan Haddock
      Plugins Active and installed: 
      Akismet Anti-Spam
      Coming Soon Page & Maintenance Mode by SeedProd
      Contact Form 7
      Cookie Law Info
      DMS Professional Tools  
      Enhanced Media Library  
      Flamingo
      Google Analytics for WordPress by MonsterInsights
      Google XML Sitemap
      Jetpack by WordPress.com
      Legull 
      Loginizer   
      MailChimp for WordPress
      PageLines Updater    
      Schema App Structured Data 
      Sucuri Security - Auditing, Malware Scanner and Hardening
      Uber reCaptcha    
      Yoast SEO
      Wordpress Version: 4.8.1
      Pagelines Version: 2.2.4
       
      Good Evening/Afternoon or Morning, 
      I am running into a problem with CSS styling not applying inside of most browsers (Safari, Firefox) when I am logged in to wordpress, and all browsers that I have tested when I am logged off and the site has been made public (Chrome, Firefox and Safari).
      As a result, I have managed to identify the probable cause. It looks as though these browsers are refusing to render my sites compiled CSS file due to it being a HTTP URL rather than HTTPS.
      I have attempted to change this URL to HTTPS in my browser, however it brings back an ERROR: File not found page - https://www.shortfilmblog.com/wp-content/uploads/pagelines/compiled-css-core-1505847507.css
      What would you suggest in this regard? Would this be resolvable from your end?
      Happy to provide any further details required.
    • Borries
      By Borries+
      I know this is not an easy problem. Maybe there is a easy solution.
      I have tryed to uses the existing solution, that I have found in the forum
      I changed the colours of my nav (simple nav) and the hover effect (a. hover).
      I really tryed to highlight the active/used link in the nav but I cant figure it out.
      I want it to be black when active.
      Any help would be appreciated. Thanks.
      http://www.marcborries.de  nav link: "Sinn & Selbst" 
    • Michael Kummer
      By Michael Kummer+
      Hi guys,
      every since Chrome introduce scroll anchoring (see chrome://flags) blog posts on my page start scroll automatically as soon as the user scrolls down a bit. It is super annoying and I don't know exactly what triggers the incompatibility with Chrome's latest feature that is supposed to improve usability.
      Since I don't know what causes it (Pagelines, or a Plugin), I would like to disable the feature using a CSS override that Google describes as follow:
      "Scroll anchoring aims to be the default mode of behavior when launched, so that users benefit from it even on legacy content. A CSS property overflow-anchor can disable scroll anchoring in part or all of a webpage (opt out), or exclude portions of the DOM from the anchor node selection algorithm. This property supports the following values when applied to an element E:
      overflow-anchor: auto (the default value) declares that the DOM subtree rooted at E is eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E. overflow-anchor: none declares that the DOM subtree rooted at E is not eligible to participate in the anchor node selection algorithm for any scrolling box created by E or an ancestor of E." Do you guys happen to know how to use that property with the ROOT element so it applies to the whole page?
      Thanks
      Michael 
×