1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

IE 7 div alignment problems!

Discussion in 'CSS' started by creationboy, Sep 8, 2007.

  1. #1
    Hi, im having problems with the alignment of a div called #content-wrap as you can see here http://www.thecreations.co.uk/blog it's jumped up the screen. Any ideas?

    It works fine in FF, IE6 but cant for the life of me figure it out.
     
    creationboy, Sep 8, 2007 IP
  2. Dan_A

    Dan_A Peon

    Messages:
    65
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Remove height:100px from #header-wrap or replace it by min-height:100px
     
    Dan_A, Sep 9, 2007 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    It's also got multiple layout issues in Opera...

    Ok, let's go through the source and see what I can see.

    Feeding IE7 a different value via inlining a conditional... unneccessary at best, wasteful at worst.

    Overloaded on wrappers - at least assuming those are fixed image backgrounds... which they are indeed.

    You overthought your solutions to the layout, I would ballpark that your problem comes from overnesting and at least 60% of your HTML being unneeded/unneccessary... from using classes on objects that don't need them, to wrapping EVERYTHING in a div with a class.

    Case in point this:

    
    <div id="subheaderwrap">
    	<div id="subcont">
    	<div id="leftwrap">
    		<div id="phonenow"></div>
    		<div id="search">
    		 
    <form method="get" id="searchform"  action="http://www.thecreations.co.uk/blog/"> 
    <input type="text" class="input"  value="Search this blog.."  name="s" id="s"  
    onblur="if (this.value == '')  {this.value = 'Search this blog..';}"  
    onfocus="if (this.value == 'Search this blog..')  
    {this.value = '';}" /> 
    <input type="submit" class="searchbtn" value=""
     onmouseover='this.className="searchbtn_hover"' 
    onmouseout="this.className='searchbtn' "
     style="cursor: pointer" />
    </form>
    		</div>
    	</div>
    	<div id="add"></div>
    </div>
    </div>
    </div>
    Code (markup):
    Should probably just be:
    <div id="phonenow"></div>
    
    <form method="get" id="searchform"  action="http://www.thecreations.co.uk/blog/"> 
    	<div>
    		<input type="text" class="input"  
    			value="Search this blog.."  
    			id="s"  
    			onblur="if (this.value == '') {this.value = 'Search this blog..';}"
    			onfocus="if (this.value == 'Search this blog..') {this.value = '';}" 
    		/> 
    		<input type="submit" class="submit" />
    	</div>
    </form>
    
    <div id="add"></div>
    Code (markup):
    There is NO need for the rest of that HTML... and frankly, the 'call us' and 'sell your property' images appear to actually BE content, so they should actually be img tags and not presentational.
     
    deathshadow, Sep 9, 2007 IP