WordPress.org

Ready to get started?Download WordPress

Forums

Cross browser CSS glitch / problem with exactly the same code (4 posts)

  1. Fiboni
    Member
    Posted 2 years ago #

    Hi my name is Peter and have a CSS cross browser problem which is giving a HUGE headache. Please forgive me if his is in the wrong category. I am totally out of options :'(
    Hopefully someone of you can help me...

    I am running wordpress site with a thesis framework and a custom skin.
    This is the CCS code in my custom CCS:

    .custom .testvb
    {border:1px dotted black;
    padding-left:1em;padding-top:1em;padding-right:1em;padding-bottom:1em;
    background-color:#c5ebfb;
    background-image:url('http://www.fibonicci.com/images/gradients/gradient-5x300.jpg');
    background-repeat:x;
    background-position:center;"}

    I copied/pasted .testvb code and added a "c" to make .testvbc

    .custom .testvbc
    {border:1px dotted black;
    padding-left:1em;padding-top:1em;padding-right:1em;padding-bottom:1em;
    background-color:#c5ebfb;
    background-image:url('http://www.fibonicci.com/images/gradients/gradient-5x300.jpg');
    background-repeat:x;
    background-position:center;"}

    The code is exactly the same and both CSS codes work in Chrome, but the 2nd code does not work in Internet explorer or Firefox... WTF! :S

    <div class="testvb"> Hello, please help </div> Works in all browsers
    <div class="testvbc"> Hello, please help </div> Does not work in IE or Firefox :S

    http://www.fibonicci.com/nl/css-problem

    How is this possible????
    I have switched off auto cache. I have tried several names for the div class. I can do what I want, but the only code that works is the 'original' .testvb. Can anyone tell me if its just my IE or Firefox or that you also cant see the 2nd box...

    Does anyone have any clue? Because this goes way beyond my understanding of anything :S

  2. alchymyth
    Forum Moderator
    Posted 2 years ago #

    have you tried to get clues from a css validator, for example: http://jigsaw.w3.org/css-validator/

    both your styles have invalid syntax; exactly check the positions of the double quotes.

  3. Fiboni
    Member
    Posted 2 years ago #

    Thxa lot alchymyth!
    Was blinded by frustration and looking in the wrong direction!
    The joy in my life has returned! :D
    Thx again!.

  4. Fiboni
    Member
    Posted 2 years ago #

    The solution was:
    background-position:center;"} --> background-position:center;}

Topic Closed

This topic has been closed to new replies.

About this Topic