我在一定程度上理解响应式设计,但我正在尝试构建一个在所有平台上都能正常工作的电子邮件模板。我所包含的 jsfiddle 是我正在努力的想法。我怎样才能做到这一点,以便我的利润更多地基于百分比。我不喜欢它们是 % base 的想法,因为那样它在桌面上看起来很大,在手机上看起来很小。有什么办法可以让我的边距自动更适合窗口?
<!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" xml:lang="en" lang="en">
<head>
<meta name="copyright" content="Copyright 2013 AAM Group.." />
<meta name="description" content="None" />
<title>NewsWire - Template</title>
<style>
#wrapper { margin: 0 auto; width: 600px; }
#subject { background-color: #CCCCCC; float: left; margin-right: 5px; margin-bottom: 5px; padding: 5px; width: 285px; }
#viewBrowser { background-color: #CCCCCC; float: left; margin-left: 5px; margin-bottom: 5px; padding: 5px; text-align: right; width: 285px; }
#header { background-color: #CCCCCC; float: left; height: 75px; margin-right: 5px; margin-bottom: 5px; padding: 5px; width: 425px; }
#date { background-color: #CCCCCC; float: left; height: 75px; margin-bottom: 5px; padding: 5px; width: 150px; }
#heroUnit { background-color: #CCCCCC; float: left; height: 225px; margin-bottom: 5px; width: 600px; }
#rightBlock { background-color: #CCCCCC; float: left; height: 315px; margin-bottom: 5px; margin-top: -165px; padding: 5px; width: 150px; }
#lowerRightBlock { background-color: #CCCCCC; float: left; height: 150px; margin-bottom: 5px; padding: 5px; width: 150px; }
#banners { background-color: #CCCCCC; float: left; height: 75px; margin-bottom: 5px; width: 600px; }
#footer { background-color: #CCCCCC; float: left; height: 75px; margin-bottom: 5px; padding: 5px; width: 590px; }
.content { background-color: #CCCCCC; float: left; height: 150px; margin-right: 5px; margin-bottom: 5px; padding: 5px; width: 425px; }
.roundCorners { border-radius: 5px; }
</style>
</head>
<body>
<div id="wrapper">
<div id="subject" class="roundCorners">Subject Line</div>
<div id="viewBrowser" class="roundCorners">View in Browser</div>
<div id="header" class="roundCorners">Header</div>
<div id="date" class="roundCorners">Date</div>
<div id="heroUnit" class="roundCorners">Hero Unit</div>
<div class="content roundCorners">Content Block</div>
<div class="content roundCorners">Content Block</div>
<div id="rightBlock" class="roundCorners">Content Right Block</div>
<div class="content roundCorners">Content Block</div>
<div id="lowerRightBlock" class="roundCorners">Lower Right Content Block</div>
<div id="banners" class="roundCorners">Banners</div>
<div id="footer" class="roundCorners">Footer</div>
</div>
</body>
</html>