Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3600

    Hi,

    Here’s the page I’m talkiing about-

    http://www.identityconsulting.co.uk/Newsite/

    I had to change it a no title page, and then add a css span style (you’ll see it all in the code) to make it work how I want it.

    However, in internet explorer the negative margin I’ve got works perfectly fine, rit’s appearing where I want, however in firefox it’s an inch or two lower, which doesn’t look very good.

    Thanks!

    #42980

    Hey,

    you can use a conditional tag to adjust the margin for IE and Firefox. First give the headline a class i.e. class=”frontpage_headline”

    Then change the margin-top so that it looks good in Firefox. In header.php add following code after this line:

    <![endif]-->

    <!--[if IE]>
    <style>
    .frontpage_headline{
    margin-top: -25px;
    }
    </style>
    <![endif]-->

    #42981

    Doesn’t appear to be qorking for me…

    I put it in after the margin part of my html, and IE takes the first command, and doesn’t execute the one you just gave me. If I put it before the margin partm, neither firefox or IE uses either command…

    #42982

    No – please insert the code in header.php before following code:

    </head>

    #42983

    It would appear it still has no effect, even in between the two lines of code you told me (in header.php)…

    #42984

    I had to delete it from the place I put it as it broke it in firefox, but here if the code I had in place

    <![endif]–>

    <!–[if IE]>

    <style>

    .frontpage_headline{

    margin-top: 500px;

    }

    </style>

    </head>

    #42985

    Hey,

    you missed the closing tag – the code should look like:

    <![endif]-->
    <!--[if IE]>
    <style>
    .frontpage_headline{
    margin-top: 500px;
    }
    </style>
    <![endif]-->

    </head>

    #42986

    Well I’m not entirely sure of how it’s working, but it suddenly is…however in IE there’s still the endif tag in the upper left corner, I’m a bit confused as to why…?

    #42987

    Hey,

    Where you’ve added the code there is an extra:

    <![endif]>

    In header.php, change this:

    <![endif]>
    <!--[if IE]>
    <style>
    .frontpage_headline{
    margin-top: 500px;
    }
    </style>
    <![endif]-->

    to this:

    <!--[if IE]>
    <style>
    .frontpage_headline{
    margin-top: 500px;
    }
    </style>
    <![endif]-->

    You should be all set now :)

    James

    #42988

    Ahh fantastic, Thanks very much, all fixed!

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

The topic ‘margin difference in heading between IE and firefox’ is closed to new replies.