views:

117

answers:

4

Is there a way to set the background colour of a div in blueprint?

I noticed that class=error will set the colour to pink (notify/success are similar):

<div class="error"> 
   <p>whatever</p>
</div>

But I want to know if there is a way to set the div to some arbitrary color?

EDIT: I don't actually care about error/notify/success. I just want to be able to set the color of a div in a similar way that they do, but using a color of my choice.

+2  A: 

Time to state the obvious - why can't you just override the div.error rule with your own?

div.error { background:black; color:#fff; } .. or are you not trying to break some sort of weird convention? If so you can use a different classname.

meder
Sorry I dont actually care anything about error, I was just using it as an example of a div that had a nice background color.
megamic
+1  A: 

Yes, you can easily over-ride the CSS by specifying a rule for error in your main CSS file.

That should ideally over-ride the default colors. Else, just ensure that you use a higher specificity in your rule, something like: div.container div.error { color: red; }

Adhip Gupta
+1  A: 

Just... define your own CSS class and set the background and/or (for font color) color properties to color values; then set a div to have that as one of its classes?

Amber
A: 

You can set any color on this particular div by adding an id attribute:

<div class="error" id="myblueprint"> 
   <p>whatever</p>
</div>

Then add in your CSS file:

#myblueprint { background:blue; }
mouviciel