Advertisement

02.24.2008 at 07:32PM PST, ID: 23189282
[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.2

Why am I losing my padding when nesting divs?

Asked by dyarosh in Cascading Style Sheets (CSS)

I have a problem with my CSS and Divs and don't know what it is.  I'm formatting my page in chunks and am working on each chunk individually to get it looking the way I want.  In the code that I've included, the <div> after the line <!-- Contact Area --> is the way I want the <div> to look.  The <div> after the line <!-- Blog Cell --> uses the same formatting but the Blog and Underline no longer are indented.  If I pull this <div> out of the <div id="contactme"> it works the way I want.  I can't figure out what I need to add to get it to work.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:
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=iso-8859-1" />
<title>Test</title>
<link href="test.css" rel="stylesheet" type="text/css" />
</head>
 
<body>
 
<div id="blog_contactme">
 
	<!-- Blog cell -->
	<div class="blogcontact">
 
  		<div class="float_left"> 
			<a href="javascript:;" target="_top"><img name="bottom_index_r3_c2" src="assets_index_bottom/bottom_index_r3_c2.gif" width="44" height="12" border="0" alt="" class="blog_contact_padding"></a>	
    		<br />
    		<img name="bottom_index_r2_c6" src="assets_index_bottom/bottom_index_r2_c6.gif" width="147" height="23" border="0" alt="" class="blog_contact_padding">  
 		<!-- end div float_left --->	
    	</div>
	
		<div align="right"><a href="javascript:" target="_top"><img class="align_right" name="bottom_index_r2_c4" src="assets_index_bottom/bottom_index_r2_c4.jpg" width="147" height="98" border="0" alt=""></a>	</div>	
 
	<!-- end div blogcontact -->
	</div>
 
</div>
<br />
 
	
<!-- Contact Area -->
 
	<div class="blogcontact">
 
  		<div class="float_left"> 
			<a href="mailto:kathleen@virtualartslaw.com" target="_top"><img name="bottom_index_r3_c6" src="assets_index_bottom/bottom_index_r3_c6.gif" width="142" height="12" border="0" alt="" class="blog_contact_padding"></a>
    		<br />
			<img name="bottom_index_r4_c6" src="assets_index_bottom/bottom_index_r4_c6.gif" width="147" height="43" border="0" alt="" class="blog_contact_padding">
           	<a href="mailto:kathleen@virtualartslaw.com" target="_top"><img name="bottom_index_r5_c7" src="assets_index_bottom/bottom_index_r5_c7.gif" width="31" height="7" border="0" alt=""></a>
 
    	</div>
	
		<div align="right"><a href="mailto:kathleen@virtualartslaw.com" target="_top"><img name="bottom_index_r2_c10" src="assets_index_bottom/bottom_index_r2_c10.jpg" width="147" height="98" border="0" alt=""></a>	</div>	
 
 
	</div>
 
</body>
</html>
 
CSS
====
/* CSS Document */
@charset "utf-8";
 
* {
  margin-top: 0;
}
body {
	font-family:Arial, Helvetica, sans-serif;
	font-size:11px;
	text-align:left;
	margin: 0;
	padding: 0;
	background-color: #ffffff;
}
div { 
	margin-left:0px; 
	margin-right:0px; 
	margin-top:0px; 
	margin-bottom:0px; 
}
#header
{
	height: 112px;
	width: 800px; 
	background-image:url(top_assets/header.jpg);
	float: left;
	position: relative;
}
#header_menu {
	position:absolute;
	bottom:0;
	margin-bottom:20px;
	margin-left: 530px;
}
#header h1 {
	text-indent: -9999px;
}
#maincontent {
	background-color: #e6e6cc;
	width: 800px;
	height: 529px;
	padding: 0px;
	margin: 0px;
}
#footer {
	width: 800px;
	font-size: 9px;
	background-color: #ffffff;
	color: #b7b793;
	padding: 0px;
	margin: 0px;
	clear:both;
}
#footer img {
	padding: 0px;
	margin: 0px;
}
.col1 {
	text-align:left;
	padding-left: 50px;
	float: left;
}
.col2 {
	text-align:center;
}
.col3 {
	text-align:right;
	padding-right: 10px;
}
#blog_contactme {
	width: 776px;
	height: 145px;
	background-color: #ffffff;
	position:relative;
	left: 10px;
	border-color:#808041;
	border-style:solid;
	border-width:thin;
}
#blog_contactme img {
	padding: 0px;
	margin: 0px;
	vertical-align:middle;
}
.blogcontact {
	width: 368px;
	height: 100px;
	border-color:#dadab4;
	border-style:solid;
	border-width:thin;
	margin:20px;
}
.blog_contact_padding {
	padding-left: 25px;
	padding-top: 20px;
}
.align_right {
	align: right;
}
.float_left {
	float: left;
}
Attachments:
 
keyboard picture
keyboard picture
 
 
telephone picture
telephone picture
 
 
Loading Advertisement...
 
[+][-]02.24.2008 at 08:21PM PST, ID: 20972881

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.

 
[+][-]02.25.2008 at 10:28AM PST, ID: 20977916

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.

 
[+][-]03.20.2008 at 06:19AM PDT, ID: 21171024

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)
Sign Up Now!
Solution Provided By: dyarosh
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628