I'm having enormous troubles with a site I'm reskinning. The designers have come up with a "lovely" box surrounded some text that has a top and sides that fade out at the bottom of the box (the content of which will vary in size as it comes from a CMS). I am unable to get the darned thing to work. I've created a test case replicating the problem.
Currently the top of the box is showing up, but the sides aren't (unless you turn the top off in firebug, then they show up.....).
I'm sure I'm missing something really simple but I've been working on this non-stop for days and can't see the wood for trees.
As I'm posting a link I hope it's ok that I don't post the code...
mmm...try remove the white background color for the '.box2' class.
PeterPan may you be forever
PeterPan may you be forever young. I was actually laughing when it worked. you have no idea how long I've been looking at this code and I think that's the one thing I didn't try! Murphy's Law. Knew I needed a fresh pair of eyes.
lol...Really, no problem!
lol...Really, no problem! Thought it was rather funny also how it's always the smallest things that give you the biggest problems.
However, I do have one
However, I do have one question...I always put a colour before the url when there's a background. as the w3school states "Always set a background-color to be used if the image is unavailable."
so in this instance what should one do??
CSS values always take on
CSS values always take on their default - actually what the browser manufacturers set the value to be at the lowest level of the cascade. For background-color that value is transparent.
The w3school point is aimed at a couple of things:
- you need a fall back background for html or body
- if the underlying background (when the image is missing) would make the text unreadable, set a background colour to ensure that can't happen.
Transparent is a valid background colour. Use it where appropriate (or rather don't specify a background-color when you need transparent).
Ok I have a question...
Oh sorry, didn't read the last post to the end...you answered the question i asked. Silly me...sorry