Results 1 to 3 of 3

Thread: Divs misaligned in IE, but fine in FF.

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Divs misaligned in IE, but fine in FF.

    First off, I must state that I'm fairly new to web design, so please bear with me. Also, it might be obvious by looking at my code that I download templates and customize them to my liking... Not sure if that's frowned upon, but it's helped me learn a lot.

    Now to the problem at hand. I just recently redesigned my site, and realized today that the changes I made caused it to look awful in IE. I'm pretty sure it's a CSS problem, but I can't pinpoint it.

    Here's the site:
    http://www.congerart.com

    and here's the CSS:
    http://congerart.com/default.css

    It looks perfect in Firefox, but for some reason the "content" div is screwed up in IE. Oh... and "doodad" (I was too lazy to think of a good name) is a bit different between browsers, but that doesn't bother me. I just want to fix "content."

    Also, I've already done a little work on the CSS to get it where it is now. The rest of my site is using an older file until I fix it completely, so stick to the main page...

    Thanks for your time, and any suggestions you may have.


    P.S. If you have any comments about my actual portfolio, those would be appreciated too.

  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

    The wrapper (only 130px wide) isn't wide enough to fit the 690px + padding wide content div. So it wraps to the next line. I found that increasing wrapper to 860px took care of this but messed up the look of the right edge, it wasn't a continuous line top to bottom. So I made the wrapper 850px, and made content's right padding 0, That made it all appear to fit.

    What I did:

    Code:
     . . . .style20 {
    	font-family: Verdana, Arial, Helvetica, sans-serif;
    	color: #CCCCCC;
    	font-size: 14px;
    	font-style: italic;
    }
    #wrapper {
    width:850px;
    }
    #content {
    padding-right:0;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="header">
    </div>
    <div id="doodad">
    <hr class="st . . .
    This seemed fine in other browsers as well. You would probably want to make the change in your main styles though:

    Code:
    #wrapper {
    	width: 850px;
    	height: 507px;
    	margin-left: 20px;
    	background: #000000;
    }
    and:

    Code:
    #content {
    	width: 690px;
    	border: 0px;
    	height: 492px;
    	margin-left: 130px;
    	background-color: #000000;
    	padding: 0 0 15px 10px;
    	
    }
    I just realized that for IE 6 (I was testing in 7), you also need to remove the p element from the footer and make the image it contains display:block;

    Code:
    <div id="footer">
    <img style="display:block;" id="frontphoto" src="/images/footer1.jpg" width="850" height="40" />
      </div>
    This was still fine in other browsers.
    Last edited by jscheuer1; 07-23-2008 at 09:30 AM. Reason: add info
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Holy crap, you're a life saver!

    Thank you so much!

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
  •