Unwanted space in Dreamweaver-created layout

I have some unwanted space on either side of a div and don't know

Page 1 of 1

2 Replies - 2406 Views - Last Post: 20 July 2010 - 04:02 PM

#1 newwaytoflygb@yahoo.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 20-July 10

Unwanted space in Dreamweaver-created layout

Posted 20 July 2010 - 12:13 PM

I haven't posted code before in a forum, so in case I've done it wrong, I also attached the .htm file. Screen shot also attached.

I have unwanted gaps above and below my "subhead" div at the top of the page (the paragraph between the two rules), and I can't figure out why. I've checked cell padding, vertical space... I'm still a newb, so if it's something terribly obvious, I apologize.

<!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" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 11px;
	background-image: url(file:///Z|/User%20%20Save%20the%20Date/Save%20the%20Date%20Email/bg.jpg);
	background-repeat: no-repeat;
	margin: 0px;
}
.rule {
	text-align: center;
}
.subhead {
	color: #006;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	line-height: 20px;
	font-weight: bold;
	font-variant: normal;
	font-style: normal;
	text-transform: uppercase;
	text-indent: 0;
	padding: 0px;
	margin: 0px;
}

.region {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #f2aa3e;
	padding: 0px;
	margin: 0px;
}
.WWWWH {
	font-family: Verdana, Geneva, sans-serif;
	font-size: 12px;
	text-align: left;
	vertical-align: top;
	color: #006;
	font-weight: bold;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	color: #000;
	font-size: 12px;
}
body {
	background-position: center;
	background-image: url();
	color: #000;
}
.body p {
	margin:0;
	color: #000;
}
a:link {
	color: #ab6b0c;
}
a {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
}
a:visited {
	color: #ab6b0c;
}
.info {
	font-size: 11px;
}
-->
</style></head>

<body topmargin="0" marginheight="0">
<table width="597" height="905" border="0" align="center" cellpadding="0" cellspacing="6">
  <tr>
    <td height="114" colspan="8"><div class="rule"><img src="file:///Z|/blank/HEADER.jpg" alt="blank" width="244" height="114" vspace="15" align="middle" /></div></td>
  </tr>
  <tr>
    <td height="5" colspan="8"><div class="rule"><img src="file:///Z|/blank/rulethick.png" width="597" height="5" /></div></td>
  </tr>
  <tr>
    <td height="60" colspan="8"><div class="subhead">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur   dictum mauris et ligula vehicula congue. Morbi vulputate, ligula   convallis eleifend lacinia, justo ipsum lacinia tellus, ac consectetur   nunc dui id augue. Pellentesque nisi leo</p>
    </div></td>
  </tr>
  <tr>


http://www.kate-hoga...aveTheDate.html

Posted Image

This post has been edited by Jayman: 29 July 2010 - 06:54 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Unwanted space in Dreamweaver-created layout

#2 husseycoding  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 52
  • View blog
  • Posts: 174
  • Joined: 23-June 10

Re: Unwanted space in Dreamweaver-created layout

Posted 20 July 2010 - 03:16 PM

Hi newway,

You have 14px margin top and bottom on the paragraph element within that div. Add in this line of CSS with correct the issue:

.subhead p { margin:0 }


As a side note, I would highly recommend you replace the old table and data cell layout structure you have, its considered pretty clunky these days for anything but an actual table.
Was This Post Helpful? 1
  • +
  • -

#3 newwaytoflygb@yahoo.com  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 20-July 10

Re: Unwanted space in Dreamweaver-created layout

Posted 20 July 2010 - 04:02 PM

Brilliant! Thank you! Ugh, I need to learn to code - when I double-clicked into the CSS rule in Dreamweaver it said all margins were already set to 0 px. That's misleading.

Thanks for the table advice, too!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1