1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

CSS Rendering in Firefox and Internet Explorer

Discussion in 'Programming & Webmastering' started by bussinessmenss, Oct 13, 2007.

  1. bussinessmenss New Member

    Joined:
    Oct 13, 2007
    Messages:
    3 (0.00/day)
    Thanks Received:
    0
    Hey guys, is it true that the output for the above will be different in both browsers?

    Im trying to position a table right all the way to the top using CSS. Somehow, my desired output works in Firefox but not in Internet Explorer. The table doesnt stick all the way to the top edge in IE.

    What do u tink i should do?

    CSS Code:
    table {
    position: fixed;
    top: -1px;
    border-collapse:collapse;
    }
     
  2. panchoman

    panchoman Sold my stars!

    Joined:
    Jul 16, 2007
    Messages:
    9,595 (3.61/day)
    Thanks Received:
    1,200
    i think certain functions are propietary to ie. and some are propietary to netscape/firefox.
     
  3. Thermopylae_480

    Thermopylae_480 New Member

    Joined:
    May 27, 2005
    Messages:
    3,686 (1.07/day)
    Thanks Received:
    393
    Location:
    Little Rock Arkansas, United States
    It can be difficult to make everything look right in all browsers. You have to fiddle with it until you can find a middle ground that you find exceptable on both browsers.
     
  4. panchoman

    panchoman Sold my stars!

    Joined:
    Jul 16, 2007
    Messages:
    9,595 (3.61/day)
    Thanks Received:
    1,200
    or you can make a detection script that'll detect the users browser and execute different scripts, (one css script for firefox, one for ie, etc.)
     
  5. bdamico New Member

    Joined:
    Oct 9, 2007
    Messages:
    9 (0.00/day)
    Thanks Received:
    1
    Location:
    Franklin Park, NJ
    You should first define in a totally separate CSS line BODY{ MARGIN-TOP: 0px;}

    Then give your table a name, eg #MAINTABLE
    {position: fixed;
    top: -1px; (change to 0px )
    border-collapse:collapse;

    In your HTML you then simply state

    {table id="MAINTABLE" }
    {tr}{td}

    {/td}{/tr}
    {/table}

    I should add if you are trying to customize blogging software such as WordPress its next to impossible to get identical layouts across all browsers.
     
  6. mdashoot

    mdashoot New Member

    Joined:
    Oct 6, 2007
    Messages:
    450 (0.17/day)
    Thanks Received:
    15
    Location:
    Las Vegas, NV
    There are IE hacks that you can use to make it look the same in both browsers, im not sure exactly what but you could probably google "css IE hacks for firefox" or something like that and figure it out. IE doesnt recognize code the same as FF, you should build your code using FF and then go back and use the IE code hacks to make it look correct in both. All I know is ''!important" is used a lot, also when you define positions like, width: 10px; height: 10px;
    then put after that _width: 5px;. IE will recognize the first one and FF will use the _width one, I THINK!
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)

Share This Page