format lost in div

Discussion in 'Web Design and Development' started by Muskie, Apr 3, 2007.

  1. Muskie macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #1
    Hi,

    I am working on this site: www.visualcomm.com/site and am having some slight problems with formatting across different browsers (surprise). My main problem right now, is the formatting of the content div. I have a div in the main area which will display various html pages based on the button the user clicks (done via js/ajax type setup).

    Code:
    #content {
    	background-image: url(imagesetc/curves/curve1.jpg);
    	background-repeat: no-repeat;
    	position: absolute;
    	padding: 10px;
    	top: 110px;
    	left: 152px;
    	right: 0px;
    	bottom: 160px;
    	overflow: auto;
    }
    
    So if you click the "Team" button, the team.html file will load into the "content" div. The problem is, from what I can tell, that Safari and IE6 seem to drop what formatting I have set up in the html pages and just throw the content into that div. In Firefox it works fine. there are two columns in the "Clients" page and the images on the "Team" page are floated left of the copy. In IE6 and Safari that formatting is lost.

    If that made sense, does anyone have any ideas? I'll supply any other coding if someone needs.
     
  2. epochblue macrumors 68000

    epochblue

    Joined:
    Aug 12, 2005
    Location:
    Nashville, TN
    #2
    It doesn't look like you have any height/width constraints for the content div. The top/left/right/bottom is used purely for positioning, and thus your overflow:auto rule is probably being ignored.

    Try adding height/width attributes.
     
  3. Muskie thread starter macrumors 6502

    Muskie

    Joined:
    Dec 1, 2003
    Location:
    Minneapolis
    #3
    I'm trying to avoid those attributes, so that it will scale nicely. I like how dynamic it can be this way for different size monitors/browser windows.

    I hadn't thought about that though. I'll see what happens. Thanks
     
  4. elppa macrumors 68040

    elppa

    Joined:
    Nov 26, 2003
    #4
    If you turn javascript off then your website is next to useless.

    Why not just make them normal links, that way no one is excluded.

    It's not a application, it's a website, so it should behave like one.
     
  5. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    Height and width attributes don't have to be set to fixed values. They can also be percentages! :)
     

Share This Page