Forum Moderators: not2easy

Message Too Old, No Replies

I love Mozilla and Firefox but why don't they love me?

Styling doesn't work in Mozilla/Firefox/Safari but does in IE/Opera

         

ChristiMc

6:40 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



I've been slogging along designing my first website with CSS and I thought I'd put a final touch on a picture gallery by adding a title to the gallery at the top of the container div. It was simple...really. White text, small-caps, centered.

I tried using class or ID to format the text but neither work in Mozilla or Firefox. It's like they are ignoring the styling. Is there some little know (or widely known) problem that I've yet to uncover that will make this work?

Here's the code:

<div id="container">
<div class="gallery">Gallery Title Here</div>
<div id="center"></div>
</div>

---CSS-----

#container {
width: 100%;
float: left;}

#center {
width: 85%;
margin-left: auto;
margin-right: auto; }

.gallery {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1.1em;
font-weight: bold;
font-variant: small-caps;
color: #FFFFFF;}

Thanks in advance. You've been able to solve all my problems thusfar and I'm hoping you'll be batting 1000 (to use a well worn sports cliche) with this one.

vinzzz

7:11 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



ehm, it works with me, is it totally ignoring everything?

ChristiMc

7:52 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



Hi vinzzz

Well, no, not exactly. It's picking up the body tag styling but not the subsequent .gallery styling.

Any help?

createErrorMsg

7:56 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Christi, can you post some more of your code for us? I'm not seeing anything here that would cause a problem. your syntax looks right, no invalid properties...something else must be at play.

ChristiMc

8:02 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



Sorry for the rapid postings. I thought I'd make this an internal style sheet just to see what would happen.

It Works! Why? Why not in my external style sheet?

When I remove the internal styles the formatting is lost again but when I put the internal styles back, it works fine.

hmmmmm.

HarryM

8:35 pm on Oct 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you checked that your external stylesheet validates?

ChristiMc

8:57 pm on Oct 17, 2004 (gmt 0)

10+ Year Member



Yowza! Shezam! That did it.

Why didn't I see it? There was a problem in the external code (a missing "}").

Once that was cleaned up all was well.

Thank you all! I sure hope I won't need to darken the WebmasterWorld doorways any time again soon. You are all just great!

ChristiMc