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

    • 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 
    • wyo22ski
      By wyo22ski+
      Hello,
       
      I'm basically a designer and understand a little on how to change CSS, etc., so please excuse my ignorance...  I recently upgraded to the newest platform from the DMS and my old DMS theme no longer functions.  I'm trying to replace the image slider that my Horizon Photography Theme (Nick Haskins) had created.  The Impulse image slider seemed the closest to what I need, but there are problems.
      It seems the the Impulse section for sliding images defaults to the image width, no the height.  I can change the Impulse stage height and width, but this does nothing to the internal content.  For instance, if I change the height to 200 pixels, the image remains the full width and only shows a cropped section.  I would like the ability to change the Impulse height, and have the image height fit space. 
      I've put this custom CSS in, but again, this only controls the stage height of Impulse:
      .pl-sn-impulse .pl-impulse-cell .cell-wrap, .pl-impulse-container, .owl-stage-outer {
        width: 100%;
      }
       
      Any suggestions welcome.  Thanks 
×