I would like to know how to set dynamic background colour using CSS.
For example if you go to this link you will see the background colour of the Ask a question button is #5CB85C but my theme colour is #CD2122. What is want is Background colour of Ask a question should be dependant on my theme colour. So if I change the theme colour to Red, Blue or anything button colour should also be changed accordingly.
Hope I was able to explain it clearly.
Thanks
Avinash
you have to made a css for this two different css like blue.css n red.css when your theme color red than call red.css .. according to theme change css..
Related
I've been struggling with the background color of the Rmarkdown HTML output. I'm not a CSS or HTML expert, so a came asking for help. I want to divide the background into two or more colors (not only the chunks). For example, start with white, after some plots change it to blue, and after more tables/plots finish with red.
I know that using:
<body style="background-color:#F5F5F5;">
I can change the color of the whole body, but it doesn't allow me to change it a second or third time in the same document. So I want to know if there is a way to have more than one background color and how to accomplish it.
Thanks in advance.
I have tried using id's for each individual navbar options but the background color wont change only the text in the navbar changes.
My required outcome is to get a background color for each navbar option.(Note this is a bootstrap template I am editing). This is a link to my files with what I have tried so far.
You can add styling inline with html using style="background-color:blue;"
if you are using the bootstrap template then you can use the following classes
class="bg-primary" // to add blue background.
.bg-secondary // to add gray.
.bg-success // to add green etc.
to change the text use class="text-primary" and other classes.
check out more here(colors) and here (navbar).
I am creating a dashboard that needs to adhere to corporate style requirements. I need to alter the background color of the header. I have successfully altered the color except for when I mouse over the header, it changes to a different color.
Here is an example of the header with the proper color scheme:
Here is the same dashboard with my mouse hovering over the header:
For added measure, here is the result of inspecting the element:
Any help that can point me in the right direction to keep the background of the header a white color would be greatly appreciated.
There will be an css property most likely .logo : active or something - remove this.
Would need full code to give a definitive answer.
I solved the problem by adjusting the CSS that appears in a supporting CSS file. In the OP, the inspect element tool points to a second CSS file that I had not altered. Specifically, the all-skins.min.css file.
Once I located that file, which for R/shinydashboard, the file appears in the AdminLTE directory of the package library/shinydashboard, I found the element that affected the behavior:
.skin-red .main-header .logo:hover{background-color: }
Since I wanted the background color to remain white, even on hover, I inserted #FFF into the background-color element and, now, the background color for the header remains white even on hover.
My problem is I have created a website using an online website creator for free. The only way to edit my website is through the builder. They have provided me a <head> tag where I can copy paste code to change.
In my web page I want to make my text background transparent. I.e. make background same as my website background. Thank you for help.
Inside your head tag, find a style tag and add this on a new line.
#content {background-color:transparent}
If you can't find a style tag, create one:
<style>
#content {background-color:transparent}
</style>
I think its better if you use 'rgba' color mode.
r red
g geen
b blue
a alpha (opacity)
You can find rgb values of any color in adobe Photoshop or any other image editors in market.
in the given image the color is"#d10f0f"
You can write it in css
background-color:#d10f0f;
aslo in rgba
background-color:rgba(209,15,15,0.5);
and here you can change the transparency of the color by adjusting the last value "0.5" you can choose any value between 0.1 to 1.
I have inherited a wordpress site using a theme. There is a background color on hover in the portfolio section of the site that we want changed. I cannot find where this color is declared at so I can change it. I thought it was an element called gallerySelectorList but nothing I did changed the color. The demo site of this theme is here : http://demo.pixelentity.com/?surreal
If anyone can help me that would be great I am losing my mind trying to track this thing down and change it. I posted on the creator of the theme's forum but got no where.
Within the Chrome Developer Tools you can invoke the :hover state of any element. In this case, you want to do so for the li wrapping the link. When do we do this, we see the color is set here:
.gallerySelectorList li:hover {
background: #83103e;
}
This code is located within your HTML file:
It looks like it's not actually a hover, but more so being faded in background color. Found then pink color in the class thumbTextWrap.
.thumbImage .thumbTextWrap { background:#8b133c; }
When I changed that or removed it changed the background hover color as needed in the dev tools.