+ Post New Thread
Results 1 to 6 of 6
Web Development Thread, Firefox not rendering same as IE in Coding and Web Development; I don't if anyone here can help but found some code on net to use CSS to produce a CMS ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,723
    Thank Post
    1,452
    Thanked 581 Times in 435 Posts
    Rep Power
    165

    Firefox not rendering same as IE

    I don't if anyone here can help but found some code on net to use CSS to produce a CMS type link which I quite liked but it renders differently in Firefox from IE - can anyone help me display it left aligned in both browsers?
    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="en-gb">
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Click on the links below for our opening dates</title>
    
    
    <style type="text/css">
    <!--
    a:visited {
      text-decoration:none; 
      text-align:left;
      background-color:#FFDE08; 
      color:#000000; 
      display:block; 
      width:50%; 
      border:2px solid #fff;
      border-color:#def #678 #345 #cde;
      padding:0.25em;
      margin:0.5em auto;
      }
    a:link {
      text-decoration:none; 
      text-align:left;
      background-color:#FFDE08; 
      color:#000000; 
      display:block; 
      width:50%; 
      border:2px solid #fff;
      border-color:#def #678 #345 #cde;
      padding:0.25em;
      margin:0.5em auto;
      }
    
    a:hover {
      top:2px;
      left:2px;
      color:#000000;
      border-color:#345 #cde #def #678;
      }
    //-->
    </style>
    
    </head>
    
    <body>
    
    
    
    
    <font face="Arial">Click on the links below for our opening dates</font></p>
    
    
    
    
    <font face="Arial"><a target="_self" href="pdfs/termdatesthis.pdf">This 
    school year (Sep 2006- Jul 2007)</a></font></p>
    
    
    <font face="Arial"><a target="_self" href="pdfs/termdatesnext.pdf">Next 
    school year (Sep 2007 - Jul 2008)</a></font></p>
    
    
    </body>
    
    </html>
    regards
    Simon
    PS or point me off to the equivalent of here for web coding

  2. #2

    beeswax's Avatar
    Join Date
    Jul 2005
    Location
    England
    Posts
    2,284
    Thank Post
    285
    Thanked 225 Times in 153 Posts
    Rep Power
    130

    Re: Firefox not rendering same as IE

    have you got a URL we can look at?

  3. #3

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318

    Re: Firefox not rendering same as IE

    It's the margin:0.5em auto; on a:visited and a:link that is aligning it in the middle (the auto is being applied to the left and right margins and 0.5em to the top and bottom). Just remove the 'auto' bit.

  4. #4

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,723
    Thank Post
    1,452
    Thanked 581 Times in 435 Posts
    Rep Power
    165

    Re: Firefox not rendering same as IE

    @craig
    Ta very much

    Do you know why the browsers treat it so differently (and which one is doing it "right" (or is it neither!) )

    regards

    Simon

  5. #5

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,800
    Thank Post
    110
    Thanked 582 Times in 503 Posts
    Blog Entries
    1
    Rep Power
    223

    Re: Firefox not rendering same as IE

    firefox is standards compliant, IE isn't. IE also has several CSS and DHTML bugs. Here's a site listing and demoing them:

    http://www.positioniseverything.net/explorer.html

    Generally the way to work round this is to detect the browser version and serve two versions of code (one for IE, one for everybody else).

  6. #6

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,374
    Thank Post
    625
    Thanked 951 Times in 653 Posts
    Blog Entries
    2
    Rep Power
    318

    Re: Firefox not rendering same as IE

    I agree with everything Geoff says. There are also "workarounds" or "hacks" that you can do in CSS to aim certain attributes to certain browsers. For example you can enclose a style directive by comments that one browser will ignore and another won't.

SHARE:
+ Post New Thread

Similar Threads

  1. Firefox instead of IE
    By DevilsAdvocate in forum Windows
    Replies: 14
    Last Post: 8th December 2007, 12:45 PM
  2. Firefox lock down
    By stu in forum How do you do....it?
    Replies: 9
    Last Post: 21st November 2007, 12:25 PM
  3. Firefox
    By ndavies in forum Educational Software
    Replies: 3
    Last Post: 31st October 2007, 02:10 PM
  4. Website rendering problem
    By beeswax in forum Web Development
    Replies: 4
    Last Post: 23rd May 2007, 09:22 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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