Problem with CSS in header

Discussion in 'Templates customization' started by rfbesa, Sep 25, 2008.

  1. rfbesa

    rfbesa New Member

    Joined:
    Jun 2, 2008
    Messages:
    28
    Hello everyone!

    I have a header with my logo and a link to another page. My logo is almost at the top-left of my page and the link is on the right of my logo. To customize this I've use some styles in the site.css file.

    This is part of my header.html file code:

    <head>
    <div class="myamemberheader">
    <img src="http://www.mysite.com/images/mylogo.png" alt="MyLogo" title="MyLogo" id="logo" />
    </div>
    <div class="linkbackclassdiv">
    <a class="linkbackclass" href="http://www.myothersite.com/">&lt;&lt; Go to My other site</a>
    </div>
    <title>{$title}</title>
    ...


    And my styles are the following:


    body {
    background: #fff url(http://www.mysite.com/images/bg-body.gif) repeat-x 0 0;
    }

    div.myamemberheader{
    margin-top: 1.6em;
    margin-left: 0.9em;
    }
    div.linkbackclassdiv{
    margin-left: 20.5em;
    margin-top: -4em;
    }
    a.linkbackclass{
    font-family:Arial;
    font-weight:bold;
    font-size: 0.8em;
    color:red;
    text-decoration: none;
    }

    a.linkbackclass:hover {
    color:red;
    text-decoration: underline;
    }


    What is my problem? Well, when I enter in any Amember page, I can see for one or two seconds the logo and the link without style, this is, the logo is totally at the top-left of the page, and the link is below the logo. One or two seconds later everything goes to the correct position, but the visual effect is awful :-S.

    I don't think is a problem of performance or something like that because I have Amember integrated with Moodle and Drupal, all of them with the same header, and this problem only occurs in Amember.


    I don't know where to look at, I've tried a lot of possibilities with my styles (removing or changing them) and I have always the same results, the logo and the link appears without styles for a second and then they appear OK.

    Any of you could help me?

    Thank you very much!
  2. Sergei

    Sergei aMember Pro Customer

    Joined:
    Mar 6, 2006
    Messages:
    96
    Whats the encoding of your site? That makes a world of difference.
  3. rfbesa

    rfbesa New Member

    Joined:
    Jun 2, 2008
    Messages:
    28
    Hello Sergei!

    Where could I see that? I'm not sure, but I'm using en_utf8 and es_utf8. Is this what you are looking for?

    Thank you very much!
  4. Sergei

    Sergei aMember Pro Customer

    Joined:
    Mar 6, 2006
    Messages:
    96
    Yes, with UTF whitespace are being interpreted as symbols so you might want to check that out. Also document encoding is also important, if its xml and can throw your browser into quircks mode.

Share This Page