Stylesheet editor won't retain my changes – how to fix?
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):
background: #222; /* Show a solid color for older browsers */
background: -moz-linear-gradient(#252525, #0a0a0a);
background: -o-linear-gradient(#252525, #0a0a0a);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#252525), to(#0a0a0a)); /* older webkit syntax */
background: -webkit-linear-gradient(#252525, #0a0a0a);
background: #069; /* Show a solid color for older browsers */
background: -moz-linear-gradient(#006699, #003366);
background: -o-linear-gradient(#006699, #003366);
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#006699), to(#003366)); /* older webkit syntax */
background: -webkit-linear-gradient(#006699, #003366);
…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:
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.
There is no blog linked to your username. Please post an active link starting with http:// to the blog in question.
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.
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.
Thank you, thesacredpath, for the insight. I guess this can’t be fixed.
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.
The topic ‘Stylesheet editor won't retain my changes – how to fix?’ is closed to new replies.