Results 1 to 5 of 5

Thread: Style in IE and FF

  1. #1
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Style in IE and FF

    i used the following code in my html file and it work fine on FF but not IE, what wrong with it ?

    style="margin-left : -10px; margin-top : -10px;"

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is nothing wrong with that style. The problem must have to do with something else on your page and/or differences in rendering between the two browsers.

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    all i wanted to do is move the banner to the top left corner so there is no space from the top and from the left but it doesn't seem to work on IE, is there an alternative ?
    Last edited by taydu; 01-23-2008 at 05:56 AM.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The difference you observe is the difference in the default margin and padding for the body element between browsers. In the case of IE and FF, it is only margin, but some other browsers have default padding for the body as well. So, what you could do is remove the individual style for the div, and zero out margin and padding for the body:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
    </head>
    <style type="text/css">
    body {
    margin:0;
    padding:0;
    }
    </style>
    <body>
    	<div>
    	  <script type="text/javascript">
    AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','740','height','110','src','ddth_740x110','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','ddth_740x110' ); //end AC code
    </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="740" height="110">
            <param name="movie" value="ddth_740x110.swf" />
            <param name="quality" value="high" />
            <embed src="ddth_740x110.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="60"></embed>
          </object></noscript>
        </div>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Sep 2006
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks jscheuer1

    that work great

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •