css change issue
-
I am trying to remove the borders from images on my content pages.
It works when I use this code:
<style type="text/css">
.entry-content img{
border:0px solid #e3e3e3;
margin:5px;}
</style>in the html part of the page editor.
However, when I edit with the visual editor this css code disappears.
I have tried adding the code as above to the graphene child style sheet under editor, and to the custom css under graphene options, display. Neither of these seem to work.
Am I doing something wrong with the css editors? Or is there a way to make the css edits under the html editor remain?
I’m using a child theme and the image is on this page – content page
Thanks in advance for any help
Add this to chile theme style sheet or in Graphene Custom CSS
.entry-content img, .wp-caption {
border: 0px;
}Hi Prasanna,
Thanks. I tried your new code but the same thing is happening. It is working when I edit the html on the page editor (providing I add
<style type="text/css"> </style>), disappearing when I do anything on the visual editor. Nothing is happening when I put the code into either CSS child style sheet or custom css.Any other suggestions?
Thanks
Prasanna’s code should work.
Go ahead and add it to your custom css option again. And I’ll take a look and make sure it’s loading correctly.
Remove these lines from your child theme style sheet. That is not the correct way to add css code to style sheet.
<style type="text/css">.entry-content img, .wp-caption {
border: 0px !important;
} </style>
*/<style type="text/css">.entry-content img, .wp-caption {
border: 0px !important;
}</style> */You should also change,
/*
*/#header-menu, #header-menu-wrap {
background: none repeat scroll 0 0 #494B51 !important;
} */TO
#header-menu, #header-menu-wrap {
background: none repeat scroll 0 0 #494B51 !important;
}Remove everything after
@import url("../graphene/style.css");from your child themestyle.cssand put the below code.#header-menu, #header-menu-wrap {
background: none repeat scroll 0 0 #494B51 !important;
}
.entry-content img, .wp-caption {
border: 0px !important;
}Also remove this code from Graphene Custom CSS,
.entry-content img, .wp-caption {
border: 0px;
}
.entry-content img, .wp-caption {
border: 0px;
}Hi Prassana,
Thanks, I have made all the changes.
One problem, is that if I change `*/ #header-menu, #header-menu-wrap {
background: none repeat scroll 0 0 #494B51 !important;
}*/`
to
`#header-menu, #header-menu-wrap {
background: none repeat scroll 0 0 #494B51 !important;
}`
my customization, changing the solid colour of the menu bar, reverts back to graphene theme. I tried all sorts of ways to change this to a dark grey rather than black, and only by using */ */ either side of the code did it work! So I have put them back but can remove them if you need to see this?
The border around the image remains.
Yes man. None of the custom css code are working because of your
#header-menucode. You are not commenting it properly.*/ */is not the right way to comment. It is/* some crap */Once again remove everything after
@import url("../graphene/style.css");and add this.#header-menu, #header-menu-wrap {
background: #494B51 !important;
}
.entry-content img, .wp-caption {
border: 0px !important;
}
Viewing 10 posts - 1 through 10 (of 14 total)
- 1
- 2
- You must be logged in to reply to this topic.
