Need help? Check out our Support site, then


Stylesheet editor won't retain my changes - how to fix?

  1. Hi all - I am trying to edit the colors in the menu bar of the Twenty Eleven theme, but the WordPress CSS Stylesheet editor won't let me do it. I am hoping that someone can tell me what I'm doing wrong.

    I am trying to change this (default code):

    #access {<br /> background: #222; /* Show a solid color for older browsers */<br /> background: -moz-linear-gradient(#252525, #0a0a0a);<br /> background: -o-linear-gradient(#252525, #0a0a0a);<br /> background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */<br /> background: -webkit-linear-gradient(#252525, #0a0a0a);<br /> ...<br /> }

    ...to this:

    #access {<br /> background: #069; /* Show a solid color for older browsers */<br /> background: -moz-linear-gradient(#006699, #003366);<br /> background: -o-linear-gradient(#006699, #003366);<br /> background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#006699), to(#003366)); /* older webkit syntax */<br /> background: -webkit-linear-gradient(#006699, #003366);<br /> ...<br /> }

    ...but when I preview the site, the menu area is blank (white text on white background). When I return to my custom CSS, the editor has removed all of the color references and left me with this:

    #access {<br /> background:0;<br /> ...<br /> }

    Does anyone know how I can get these changes to "stick"? The CSS I'm trying to upload works OK outside of WordPress, so I think my code is OK. Thanks in advance for any help.

    The blog I need help with is privacylawwatch.com.

  2. There is no blog linked to your username. Please post an active link starting with http:// to the blog in question.

  3. Also have you purchased a custom design upgrade? Until you do that the CSS changes you make in the preview view will not "go live" on the blog. Only you will be able to see what you do in preview mode.

  4. WordPress uses CSS tidy to help keep mistakes out of the CSS and to check syntax and such, and it has yet to be updated to accept multiple background declarations. The default original code (in the original CSS) is not affected by CSS tidy since we don't actually "edit" the original CSS files. That is why it appears in the original CSS, but when we try to use it it gets stripped out.

  5. Thank you, thesacredpath, for the insight. I guess this can't be fixed.

  6. It will be fixed at some point when a new version if CSS tidy comes out, but for the moment we are sort of stuck. Also, you need to include at least 2 Internet Explorer alpha filters otherwise no IE user will see a gradient. Of course, that is something to remember in future when we can declare multiple backgrounds.

Topic Closed

This topic has been closed to new replies.

About this Topic