- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
如何让另一个框显示在第一个框的底部?
如果您尝试此代码,这两个框将一起显示:
一个B
我希望它是这样的:
一个
B
谢谢
===现在这就是我所做的:但它转到了左侧。我希望它留在右侧。这是完整的代码:
<html>
<head>
<title>*|MC:SUBJECT|*</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<style type="text/css" media="screen">
p{margin-bottom:10px;}
/**
* @tab Page
* @section background color
* @tip Choose a color for your HTML email's background. You might choose one to match your company's branding.
* @theme page
*/
body {
/*@editable*/ background-color:#FFFFFF;
text-align:center;
}
#layout {
margin:0 auto;
text-align:left;
}
/**
* @tab Header
* @section header top
* @tip Set the look of the archive link bar.
*/
#header-top {
/*@editable*/ background-color:#FFFFFF;
/*@editable*/ border-top:0px none;
/*@editable*/ border-bottom:0px none;
/*@editable*/ color:#505050;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:11px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
padding:15px 0 5px;
/*@editable*/ text-align:center;
}
/**
* @tab Header
* @section title style
* @tip Titles and headlines in your message body. Make them big and easy to read.
* @theme title
*/
.primary-heading {
/*@editable*/ color:#ACCB4E;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:48px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:100%;
margin:0;
padding:0px;
/*@editable*/ text-transform:uppercase;
}
/**
* @tab Header
* @section subtitle style
* @tip This is the byline text that appears immediately underneath your titles/headlines.
* @theme subtitle
*/
.secondary-heading {
/*@editable*/ color:#ACCB4E;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:20px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:100%;
margin:0;
padding:10px 0 0 0;
/*@editable*/ text-transform:uppercase;
}
/**
* @tab Body
* @section content
* @tip This is the default text style for the main content of your email.
* @theme content
*/
#content-left, #content-right {
/*@editable*/ background-color:#FFFFFF;
/*@editable*/ color:#808080;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:14px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:150%;
padding:15px 0 15px 20px;
vertical-align:top;
width:300px;
}
#content-right{
vertical-align:top;
}
/**
* @tab Body
* @section green box
* @tip This is the default style for the green tip box of your email.
* @theme content
*/
#greenbox{
/*@editable*/ background:#ACCB4E;
/*@editable*/ color:#FFFFFF;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:16px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:150%;
margin-top:20px;
padding:10px 20px;
/*@editable*/ text-transform:none;
}
/**
* @tab Body
* @section green tip box heading
* @tip This is the default style for the heading of the green tip box.
* @theme content
*/
#greenbox .secondary-heading {
/*@editable*/ color:#FFFFFF;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:20px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
}
/**
* @tab Body
* @section sidebar widget headings
* @tip This is the default style for the sidebar widgets of your email.
* @theme content
*/
.widget .secondary-heading {
/*@editable*/ color:#ACCB4E;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:18px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:100%;
/*@editable*/ text-transform:none;
}
/**
* @tab Body
* @section sidebar widget text
* @tip This is the default style for the sidebar widgets of your email.
* @theme content
*/
.widget {
/*@editable*/ color:#808080;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:12px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:150%;
margin-top:20px;
margin-bottom:15px;
width:260px;
}
/**
* @tab Footer
* @section footer
* @tip You might give your footer a light background color and separate it with a top border
* @theme footer
*/
#footer {
/*@editable*/ background-color:#FFFFFF;
/*@editable*/ border-top:0px none;
/*@editable*/ border-bottom:0px none;
/*@editable*/ color:#909090;
/*@editable*/ font-family:Arial;
/*@editable*/ font-size:11px;
/*@editable*/ font-style:normal;
/*@editable*/ font-weight:normal;
/*@editable*/ line-height:14px;
padding:20px 0 20px 0;
/*@editable*/ text-align:center;
}
/**
* @tab Footer
* @section link style
* @tip Specify a color for your footer hyperlinks.
* @theme link_footer
*/
#footer a {
/*@editable*/ color:#5D7428;
/*@editable*/ font-weight:normal;
/*@editable*/ text-decoration:underline;
}
/**
* @tab Page
* @section link style
* @tip Specify a color for all the hyperlinks in your email.
* @theme link
*/
a, a:link, a:visited {
/*@editable*/ color:#5D7428;
/*@editable*/ font-weight:normal;
/*@editable*/ text-decoration:underline;
}
</style>
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0" id="layout">
<tr>
<td id="header-top" colspan="2" mc:edit="header-top">
<p>Email not displaying correctly? <a href="*|ARCHIVE|*" title="View this email in your browser.">View it in your browser</a></p>
</td>
</tr>
<tr>
<td id="content-left" colspan="1">
<div mc:edit="main">
<!--<img src="http://gallery.mailchimp.com/0d61bb2ec9002f0e9872b8c36/images/environment_newsletter_header.png">-->
<img alt="" border="0" height="234px" src="http://gallery.mailchimp.com/86b4d752e397a2dbd09e3dd60/images/big_image_edited.2.jpg" width="400px" />
<h1 class="primary-heading">Live Green</h1>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer orem adipiscing elit. Est em morbi commodo, ipsum sed pharetra est gravida. Suspendisse id velit vitae et ligula volutpat ipsum condimentum. </p>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer orem adipiscing elit. Est em morbi commodo.</p>
</div>
<div id="greenbox" mc:edit="greenbox">
<h2 class="secondary-heading">Green Living Tip</h2>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer orem adipiscing elit. Est em morbi commodo, ipsum sed pharetra est gravida, orci magna fugit rhoncus neque, id pulvinar odio lorem non turpis. </p>
</div>
</td>
<tr> <div id="content-right" colspan="1">
<div class="widget" mc:repeatable>
<div mc:edit="content-right-repeatable">
<h2 class="secondary-heading">Green Living Tip</h2>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer orem adipiscing elit. Est em morbi commodo, ipsum sed pharetra est gravida, orci magna fugit rhoncus neque, id pulvinar odio lorem non turpis.</p>
<p><a href="#">Read More</a></p>
</div>
</div>
</div>
</tr>
<tr>
<div id="content-right" colspan="1">
<div class="widget" mc:repeatable>
<div mc:edit="content-right-repeatable">
<h2 class="secondary-heading">Green Living Tip</h2>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer orem adipiscing elit. Est em morbi commodo, ipsum sed pharetra est gravida, orci magna fugit rhoncus neque, id pulvinar odio lorem non turpis.</p>
<p><a href="#">Read More</a></p>
</div>
</div>
</div>
</tr>
</tr>
<tr>
<td id="footer" colspan="2" mc:edit="footer">
<p><a href="*|UNSUB|*">Unsubscribe</a> | <a href="*|UPDATE_PROFILE|*">Update your profile</a> | <a href="*|FORWARD|*">Forward to a friend</a></p>
<p>Copyright (C) *|CURRENT_YEAR|* *|LIST:COMPANY|* All rights reserved.<br />*|LIST:DESCRIPTION|*<br />*|HTML:LIST_ADDRESS_HTML|*</p>
</td>
</tr>
</table>
<span style="padding: 0px;"></span>
</body>
最佳答案
如果您只是使用表格来布置单个元素,您可以(并且应该)为此使用 CSS。只需将'td' 转换为div,它们就会自动排列在另一个下方。然后,如果您稍后想更改位置,只需更新 CSS 而无需重新排列表格结构。
我在 http://www.htmldog.com/guides/ 找到了一系列有用的教程将布局从基于表格更改为基于 css 时。
关于css 样式与 html,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3442199/
我喜欢调整 目录的样式(例如背景颜色、字体)预订 , Gitbook 风格 HTML 文档。 这可能吗?如果是这样,有人可以善意地指出我可以开始这样做的地方吗? 谢谢你。 最佳答案 两个步骤: 1)
是否可以使用纯 CSS 选择器根据子节点的兄弟节点数量为节点子节点(在我的例子中为 UL)提供不同的属性,特别是高度? 例如,如果一个节点有 1 个子节点,则 UL 的高度是自动的,但是如果该节点有
我正在与 Vala 一起工作,它首先编译为 C,然后正常从 C 编译。 valac 的一项功能(Vala 编译器)是为 .vala 生成“fast-vapi”文件。 fast-vapi 本质上是为 .
我有两个具有 .body 类的 div,但是,一个位于另一个具有 .box 类的 div 中 - 如下所示: 我只想为 .box 内部的 .body 设置样式...但我在下面所
**注意所有 <> 标签已被删除以允许代码显示**我已经玩了好几个小时了,如果不在设计结束时使用解决方法(即 Corel 绘图),我就无法真正让它工作 *在我继续之前, 首先,网站 URL 是 Adv
我从一个服务中接收到一个字符串,该字符串显然使用 UTF-32 编码对其 unicode 字符进行编码,例如:\U0001B000(C 风格的 unicode 编码)。但是,为了在 JSON 中序列化
我在应用程序资源中有一种样式,我想将其应用于许多不同的饼图。样式如下所示: 为了简单起见,我排除了更多的属性。这一切都很好。现在,我的一些馅饼需要有一个不同的“模型
想象一下,我有一个名为“MyCheckBoxStyle”的 CheckBox 自定义样式。 如何制作基于 MyCheckBoxStyle 嵌入自定义 DataGridCheckBoxColumn 样式
我有一个 Button我在 WPF 中开发的样式,如 this question 中所述.我想用这种风格做的另一件事是拥有 Button缩小一点点,使其看起来像被点击一样被点击。现在,转换代码如下所示
我为超链接控件创建了一个样式:
不知道为什么,但我的 typeahead.js 远程自动完成停止工作。我没有更改任何关于 typeahead.js 的代码,但既然它坏了,我一定是错的。你能看看我的site here吗? ?我会创建
有没有办法创建扩展当前样式的样式,即不是特定样式? 我有一个 WPF 应用程序,我在其中创建样式来设置一些属性,例如边框或验证。 现在我想尝试一些主题,看看哪
我正在为一个网站提出问题,并希望 var reltext 中的正确/再试消息具有不同的颜色,即绿色表示正确,红色表示错误,并且每个旁边可能有一个小 png。 有什么想法吗? A local co
我想到达列表的父节点(使用 id 选择器)并使用纯 JavaScript 添加背景颜色来设置其样式。这是我的代码,但不起作用。 var listParentNode; listPare
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 4 年前。 Improve th
过去几天我一直在与这段代码作斗争,我真的不知道该如何处理它。 基本上,当用户将鼠标滚动到主导航菜单中的某个 LI 元素上时,就会运行一个 Javascript 函数,并根据触发该函数的元素将链接放入下
使用这个可爱的 html 和 css 作为指南,我能够在我的照片上显示我的姓名首字母。 这很好,但是,如果图像不存在,我只想显示首字母;如果图像存在,则不应渲染 peron 首字母。 换句话说,当该图
使用这个可爱的 html 和 css 作为指南,我能够在我的照片上显示我的姓名首字母。 这很好,但是,如果图像不存在,我只想显示首字母;如果图像存在,则不应渲染 peron 首字母。 换句话说,当该图
是否有人尝试过将 JButton 设计为看起来像 NetBeans 工具栏按钮?这将只显示一张图片,当您将鼠标悬停在它上面时,会显示 1px 圆形角灰色边框,并且按钮顶部和底部的背景不同......似
在 Ax2012 中使用图表,它们工作正常。但我想更改它在启动时显示的图表类型,例如“样条”图表,而不是默认的“柱状图”图表。 这是我现在拥有的: http://i.stack.imgur.com/R
我是一名优秀的程序员,十分优秀!