Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cross browser margin issue

    Coding newbie here (y'all probably hear that alot). Two months ago I put together my first site with my host's site builder, it looked ok but had issues. So a couple of weeks ago I dove into some online tutorials and coded my new site up and uploaded it Tuesday night. Of course Wednesday morning I decided to make big changes including getting rid of the tables I used. But I'm having a margin issue using divs, I can make it look right in IE but then there is a 5px difference in both Firefox and Safari. If I make it look right in them it messes up in IE.
    This is the new page I'm working on: http://www.dallasfamouschicken.com/newindex1.html
    My content is still in a table (three actually) but I built the sidebar with divs. The top border of the "Hours" panel in the sidebar is spaced with a 7px margin and looks good in IE but is reduced to a 2px margin in Firefox or Safari. Any way to make it look right in all browsers? Or do I need to use a table instead? Thanks.

  • #2
    Senior Coder
    Join Date
    May 2005
    Posts
    2,137
    Thanks
    96
    Thanked 72 Times in 72 Posts
    Its nearly impossible to code websites that look the same in all browsers. It's best to shoot for one, and hope the other turns out decent.

    But I am using Firefox and there is nothing messed up.
    Rowsdower! has accused me of having mental problems, and the administrator allowed it. What a great forum huh?

  • #3
    Regular Coder Kristofa's Avatar
    Join Date
    Jun 2009
    Location
    Leicester
    Posts
    143
    Thanks
    7
    Thanked 20 Times in 20 Posts
    Quote Originally Posted by masterofollies View Post
    Its nearly impossible to code websites that look the same in all browsers. It's best to shoot for one, and hope the other turns out decent.

    But I am using Firefox and there is nothing messed up.
    If I'm seeing it right, there is, but it's barely noticeable.

    Changing margin:0 to margin-top:5px seems to work, but I don't know if that will screw it up in IE.

  • #4
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Note what you are saying. IE never looks like the other browsers. That's because IE is 11 years behind all other browsers in modern standards and practices and the worst browser on the planet. Use the other more modern browsers as your reference for what's working. Then adjust for IEs quirks and bugs.

    One problem is you have declared HTML yet are using XHTML end tags, the />. Remove those slashes as browsers sometimes stop processing at that point. Then validate your html and css for those lists of errors. Be sure to use Firefox or Safari as your reference and never IE.


  •  

    Posting Permissions

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