Grow your CSS skills. Land your dream job.

Some weird problem

  • # January 14, 2010 at 10:53 am

    Hi guys,

    First of all i want to thank Chris for the screencast about the loop, and second of all i want to thank the Doc for helping me.

    Finally i manage to get the site online(after a month + work, and first time creating a site in wordpress) and running. during my crafting i didnt come across this little weird problem after i put it online. The problem accord when you switch from HOME and ONS WERK a couple times.
    You can try it out at http://www.dreamin.nl ( this problem happens in latest firefox), it works fine in safari and chrome.
    When you click on both a couple times the div just teardown in pieces.

    my code is as follow

    CSS

    Code:
    /*START OF WOKR_MODULE_ROW*/

    .work_module_row {
    height: 205px;
    background-color: #fff;
    }

    .border {
    height: 10px;
    border-top: solid 1px #d6d6d6;
    margin-top:34px;
    }

    /*START WORK_S_*/

    .work_s {
    width: 284px;
    height: 176px;
    background-color:#4CC6E8;
    display:block;
    left: 15px;
    float:left;
    margin-right:16px;
    margin-top:37px;
    position:relative;
    border: solid 5px;
    }

    .projectthumbshadow {
    height: 15px;
    width: 300px;
    background-image: url(images/project_thumb_shadow.png);
    background-repeat: no-repeat;
    position: absolute;
    bottom: -20px;
    }

    .work_s .projectname {
    width: auto;
    color: #FCFCEE;
    font-size: 14px;
    position: absolute;
    left: -5px;
    bottom:40px;
    padding: 0 10px 0 10px;
    background-color: #000;
    }

    .projectdesc{
    width: auto;
    color: #FCFCEE;
    font-size:12px;
    position: absolute;
    left: -5px;
    bottom:13px;
    padding: 0 10px 0 10px;
    background-color: #000;
    }

    And the loop code

    Code:

    < ?php if ( (is_page('home')) or (is_page('Digitale marketing')) ){
    query_posts(array('showposts' => 1, ‘post_parent’ =>40, ‘post_type’ =>’page’));

    while (have_posts()) {

    the_post(); //Vital

    $thumbPath = get_post_meta($post->ID, ‘thumbnail’, true);

    if ($thumbPath == “”) {
    $thumbPath = “/images/comingsoon.jpg”;
    }

    ?>

    ” class=”work_s”>
    < ?php the_title(); ?>

    < ?php echo get_post_meta($post->ID, ‘projectdesc’, true); ?>


    < ?php }

    wp_reset_query(); //restore global post data

    }
    ?>

    < ?php if ( (is_page('home')) or (is_page('Promotie campagnes')) ){
    query_posts(array('showposts' => 1, ‘post_parent’ =>71, ‘post_type’ =>’page’));

    while (have_posts()) {

    the_post(); //Vital

    $thumbPath = get_post_meta($post->ID, ‘thumbnail’, true);

    if ($thumbPath == “”) {
    $thumbPath = “/images/comingsoon.jpg”;
    }

    ?>

    ” class=”work_s”>
    < ?php the_title(); ?>

    < ?php echo get_post_meta($post->ID, ‘projectdesc’, true); ?>

    < ?php }

    wp_reset_query(); //restore global post data

    }
    ?>

    < ?php if ( (is_page('home')) or (is_page('Imago ontwikkeling')) ){
    query_posts(array('showposts' => 1, ‘post_parent’ =>87, ‘post_type’ =>’page’));

    while (have_posts()) {

    the_post(); //Vital

    $thumbPath = get_post_meta($post->ID, ‘thumbnail’, true);

    if ($thumbPath == “”) {
    $thumbPath = “/images/comingsoon.jpg”;
    }

    ?>

    ” class=”work_s”>
    < ?php the_title(); ?>

    < ?php echo get_post_meta($post->ID, ‘projectdesc’, true); ?>

    < ?php }

    wp_reset_query(); //restore global post data

    }
    ?>

    I think its the CSS part which cause the problem i am not sure, although i have tried alot on fixing it but it keep appearing.

    I hope you guys can lend me a hand to fix this

    Thanks,

    Wing

# January 14, 2010 at 11:24 am

Very interesting problem!

So, if you are on the page "Ons Werk" and then click "Ons Werk" again in the nav, crazy things happen with all of your portfolio items…. but why why why. Safari is fine for me as well, only FireFox is doing it which makes me think it might be a common problem.

I doubt it’s a validating issue… I’m stumped. Anyone?

# January 14, 2010 at 12:05 pm

Hi Thedoc thanks for your quick reply..
Well during the crafting process "locally" non of the problem happen in firefox(i even double check the site locally again).
I have tried to change css/moving the loop etc but nothing change online it still have the same problem. After the locally test i tried different browser Chrome / Safari / IE8 and 7 ( ye you read it correct) both doesnt seems to give any problems.

So i am clueless on how to fix this, i hope you can help me out soon.

Thanks

Wing

# January 17, 2010 at 8:44 am

Pls can someone enlighten me on this problem

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".