123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|128|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Web Development -> Ugh... WTF is going on here ?.

Thu, 18 Dec 2008, 22:16
steve_ancell
I have just started to dig into CSS, but have found something puzzling.

The HTML/CSS below, works fine with all the colours in FireFox, but in Internet Explorer 7, it just renders the text as black.

Where did I go wrong, I have not got a clue.

Thanks in advance


Thu, 18 Dec 2008, 22:48
HoboBen
<Obj1/2/3> aren't valid html elements. For generic blocks like that, you would use <div>. Or, in this case, you can apply the styles straight to each element by giving them a class.

Here's several ways of doing it - each should look the same, but work quite differently.

Here ".obj1" in the CSS means that it will apply to any element with the class="obj1" attribute:



Here "h1.obj1" in the CSS means that it will only apply to any <h1> element with the class="obj1" attribute:





Here we're applying styles to every h1, h3, or p element



Here's another way of doing what you did originally



Hope that helps!



-=-=-
blog | work | code | more code
Thu, 18 Dec 2008, 22:54
steve_ancell
I'm sure I can get some sense from that.

Cheers Ben
Thu, 18 Dec 2008, 23:00
steve_ancell
Yay, it works !.

Thanx again Ben
Thu, 18 Dec 2008, 23:19
HoboBen
No problem Yell if you need any more tips.
Fri, 19 Dec 2008, 00:07
steve_ancell
OK, cheers