...

View Full Version : Space between divs in Dreamweaver



jdjones
02-01-2008, 12:14 AM
http://i28.tinypic.com/nd31jr.jpg
Hello:
I cannot get rid of the space between the different areas on my web page (divs) no matter what I do. Extensive googling has not returned any answers. Can someone enlighten me please? Thanks!
jdj

twodayslate
02-01-2008, 12:24 AM
We need to see some source.
Add this to the top of your style sheet:

* {margin: 0; padding: 0;}
It is much better to learn how to code than to have dreamweaver code for you. ;)

jdjones
02-01-2008, 12:35 AM
Well, that fixed it! I knew it would be that easy. Thank you, seriously. Not sure what effect that asterisk will have on the project as I move forward(?), but it works for now. As for hand-coding, I know it is better to understand it from the inside-out, but I am a visual artist by profession and am simply trying to put a visually impressive site (admittedly not represented in the above pic) together asap and don't have time to learn an entire new highly technical skill. It may be a cheap shortcut, but Dreamweaver is a lifesaver (as long as I can coax it into doing what I want).

twodayslate
02-01-2008, 12:43 AM
* {} means it will effect all elements, img, p, div, table, td, etc;

jdjones
02-01-2008, 12:48 AM
Is there a way to zero in and only apply those values where and when I desire rather than a blanket command? Here's the source from before the alteration:

@charset "utf-8";
body {
background: #1B1F27;
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;
font-size: 100%;
font-family: "Century Gothic";
}
.text120percent {
font-size: 120%
}
.oneColFixCtrHdr #container {
width: 920px;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 0px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.oneColFixCtrHdr #header {
padding-top: 10px;
padding-right: 10px;
padding-bottom: 10px;
padding-left: 10px;
background-color: #FFFFFF;
}
.oneColFixCtrHdr #header h1 {
margin: 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}
.oneColFixCtrHdr #mainContent {
padding: 0 10px; /* remember that padding is the space inside the div box and margin is the space outside the div box */
background: #FFFFFF;
}
.oneColFixCtrHdr #footer {
background-color: #FFFFFF;
padding-top: 0;
padding-right: 0px;
padding-bottom: 0;
padding-left: 10px;
}

.oneColFixCtrHdr #footer p {
padding-right: 0;
padding-left: 0;
padding-top: 0px;
padding-bottom: 0px;
}
.style7 {color: #000000}

VIPStephan
02-01-2008, 01:00 AM
I cannot get rid of the space between the different areas on my web page (divs) no matter what I do. Extensive googling has not returned any answers. Can someone enlighten me please? Thanks!
jdj

By the way: That space probably comes from collapsing margins (http://www.complexspiral.com/publications/uncollapsing-margins/).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum