Advertisement

06.28.2008 at 11:17AM PDT, ID: 23524156
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.9

Menu pushing div down in IE6

Asked by signpost2 in Cascading Style Sheets (CSS)

Tags: ,

Below is the html and css of my page. Usual thing in IE7 the page looks fine but in IE6 when you roll over my navigation the buttons push my page down revealing a white line. To be honest I don't have to have the rollover effect like this, it could just change colour and not move, but I've tried altering a few settings and none of them make a difference.

Actaully just noticed that when I put my navigation links in the topnavigation div becomes too wide and in IE6 this throws the design out. Not sure what the correct way of construction this menu is?Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
html
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="crossletts.css" rel="stylesheet" type="text/css" media="all" />
<title>Untitled Document</title>
<!--[if IE 5]>
<style type="text/css"> 
/* place css box model fixes for IE 5* in this conditional comment */
.twoColFixLtHdr #sidebar1 { width: 230px; }
</style>
<![endif]--><!--[if IE]>
<style type="text/css"> 
/* place css fixes for all versions of IE in this conditional comment */
.twoColFixLtHdr #sidebar1 { padding-top: 30px; }
.twoColFixLtHdr #mainContent { zoom: 1; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]--></head>
 
<body class="twoColFixLtHdr">
 
<div id="container">
  <div id="header">
    <h1>Network of Branches Throughout the South East</h1>
	<div id="topnavigation">
<ul id="menu">
			<li class="first"><a href="#"><span>Home</span></a></li>
			<li><a href="#"><span>Bananas</span></a></li>
			<li><a href="#"><span>Monkeys</span></a></li>
			<li><a href="#"><span>Mangroves</span></a></li>
			<li><a href="#"><span>Amazon</span></a></li>
		</ul>
	</div>
  <!-- end #header --></div>
  <div id="bodywrapper">
  <div id="leftnav">left <br /> left</div>
  <div id="mainbody">
  <div id="topbluestrip"></div>
  <div id="bodycontent">content</div>
  </div><!--mainbody end-->
  
  </div><!--bodywrapper end-->
  <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
  <br class="clearfloat" />
  
  <div id="footer">
    <p>Footer</p>
  <!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
 
 
 
CSS
 
/* CSS Document */
body  {
	font: 100% Verdana, Arial, Helvetica, sans-serif;
	background: #666666;
	margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
	padding: 0;
	text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
	color: #000000;
	padding-top: 10px;
	background:url(images/background.jpg) repeat-x;
}
.twoColFixLtHdr #container { 
	width: 920px;  /* using 20px less than a full 800px width allows for browser chrome and avoids a horizontal scroll bar */
	background: #FFFFFF;
	margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
	text-align: left; /* this overrides the text-align: center on the body element. */
} 
.twoColFixLtHdr #header { 
	background: #DDDDDD; 
	padding: 0 10px 0 20px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
	background:url(images/topheader.jpg) no-repeat;
	height: 139px;
} 
.twoColFixLtHdr #header h1 {
	margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
	padding: 45px 0 0 250px; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
	font-size: 16px;
	color:#3366CC;
}
.twoColFixLtHdr #sidebar1 {
	float: left; /* since this element is floated, a width must be given */
	width: 200px; /* the actual width of this div, in standards-compliant browsers, or standards mode in Internet Explorer will include the padding and border in addition to the width */
	background: #EBEBEB; /* the background color will be displayed for the length of the content in the column, but no further */
	padding: 15px 10px 15px 20px;
}
.twoColFixLtHdr #mainContent { 
	margin: 0 0 0 250px; /* the left margin on this div element creates the column down the left side of the page - no matter how much content the sidebar1 div contains, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the #sidebar1 space when the content in #sidebar1 ends. */
	padding: 0 20px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
} 
.twoColFixLtHdr #footer { 
	padding: 0 10px 0 20px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
	background:#DDDDDD;
	background:url(images/bottomcurve.gif) no-repeat;
	height: 45px;
} 
.twoColFixLtHdr #footer p {
	margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
	padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
	float: right;
	margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page */
	float: left;
	margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
	clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
}
/*main body*/
#bodywrapper{
width: 920px;
background-color:#fff;
background:url(images/bodywrapperback.gif) no-repeat;
}
#leftnav{
width: 238px;
background-color:#fff;
border-left:#000066 solid 2px;
float:left;
}
#mainbody{
width: 678px;
border-right:#000066 solid 2px;
background-color:#CC33CC;
 
float:left;
}
#topbluestrip{
width: 678px;
height: 30px;
background:url(images/topblustrip.jpg) no-repeat;
}
#bodycontent{
width: 677px;
}
/*top navigation*/
#topnavigation{
width: 640px;
padding: 20px 0 0 230px;
}
		#menu li a { /*Standard settings*/
			background-color: #527dc5; 
			color : #fff; 
		}
		
		#menu a:hover, #menu a:hover span { /*Hover settings*/
			background-color : #9eceff;
			color : #fff; 
		}
		
		
		/*************************ADVANCED CONFIGURATION*************************/
		
		/*Reset ALL tags to zero. This keeps cross-browser consistency*/
		* { 
			margin: 0;
			padding: 0;
		}
		
		#menu { 
			padding: 20px; /*Allow for movement of anchors within <ul> element*/
			padding-bottom: 0;
			list-style : none;
			font: 1em 'Trebuchet MS';
			text-transform: capitalize;
		} 
 
		#menu li { 
			display : inline; /*Horizontal list*/
		} 
 
		#menu li a { 
			float: left; /*Set to right or left depending on your requirements*/
 
			background-image : url('images/cornerLeft.gif'); /*Left corner image*/
			background-repeat: no-repeat;
			background-position: 0 0;
			text-decoration : none;
			margin-right: 3px; /*Anchor spacing*/
			padding-left: 20px;
		} 
 
		#menu a span { 
			display : block;
			background : url('images/cornerRight.gif') no-repeat right top; /*Right corner image*/
			
			padding: /*Top*/5px /*Right*/20px /*Bottom*/7px /*Left*/0;
		} 
 
		#menu a:hover { 
			position: relative; 
			top: -10px; /*Shift anchor upwards*/
			padding-left: 30px;
			margin-left: -10px; /*Negative margins stop neighbours shifting too*/
			margin-right: -7px;
		} 
 
		#menu a:hover span { 
			padding: 8px 30px 14px 0; /*Extra bottom padding pushes anchor back down in-line with neighbours*/
		}
[+][-]06.29.2008 at 10:52AM PDT, ID: 21894838

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 12:19PM PDT, ID: 21895176

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.29.2008 at 03:09PM PDT, ID: 21895674

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Cascading Style Sheets (CSS)
Tags: CSS, IE7, IE6 FF
Sign Up Now!
Solution Provided By: Kravimir
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.29.2008 at 04:01PM PDT, ID: 21895841

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.30.2008 at 04:13AM PDT, ID: 21898063

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.30.2008 at 04:38AM PDT, ID: 21898186

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.01.2008 at 12:50AM PDT, ID: 21905612

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628