-1

I'm very very bad with CSS (I do not understand syntax at all), I'm just using my knowledge to tinker with code. I'm using Chrome with Stylish addon, and I want to make dark wikipedia but with my preferences. I took some code from stylish and just changed colors, but now it's something new where I have to add stuff so I'm stuck. It's obviously made in chrome, so it's temporary. This is my problem:

http://imgur.com/a/9IYI3

And my question is how to make that box opaque with like #555 color, without destroying everything else.

Here is code that I'm using: pastebin.com

Oxmaster
  • 11
  • 3
  • 2
    you might should consider a css tutorial instead of asking this question here because in future you will run into problems and than have to ask again. and its very easy to learn css. can be learned in 1 hour. so give your self a chance to learn something thats good for you :) – Dwza Jun 09 '14 at 17:56
  • So you want to make just the pop up red, and leave everything else transparent? – EasilyBaffled Jun 09 '14 at 17:59
  • You can't, that's what's the `rgba()` is for - which stands for `red, green, blue, alpha` (with alpha being the opaque factor). If you make it `#f00` you are using hexadecimal colors, which don't support alpha. (Or do I not understand your question? In that case, please rephrase it) – myfunkyside Jun 09 '14 at 18:02
  • Using `div, tt, a, span[...]...` you are coloring many elements with the same rule. You're probably want something like `.tooltip{ background-color:rgba(100,100,100,.5) }` – agrm Jun 09 '14 at 18:13
  • @agrm Thanks man, that was what I needed, but I can't give you +1 :(. – Oxmaster Jun 09 '14 at 21:29

1 Answers1

0

EDIT: note that opacity will change the opacity of everything in the element it is applied to. Depending on the situation, rgba is the best route.

This can be accomplished a couple of ways:

#mybox
{
    background-color:#555;
    opacity:0.5;
}

Or

#mybox
{
    background-color:rgba(85, 85, 85, 0.5);
}

The opacity property is to change the transparency of an element (0.0 is 0%, while 1.0 is 100%).

The same can be done with rgba (red, green, blue, alpha). Alpha being similar to opacity (same affect really).

As Dwza said in the comments, it would be good for you to take some CSS tutorials. A quick Google search will bring up many. This one looks good: http://webdesign.tutsplus.com/tutorials/the-best-way-to-learn-css--webdesign-11906

Joe
  • 509
  • 1
  • 8
  • 24
  • agrm already gave me answer. I don't want to learn another language that I won't be using, I'm just editing someones code to my own preferences. Anyway thanks for help. – Oxmaster Jun 09 '14 at 21:36