- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我确定我不是第一个遇到这种情况的人,但问题是:我的网站在 Firefox 中看起来很棒,但在 Dreamweaver 和 Chrome 中却很糟糕。我一直在 Firefox 中实时编辑 CSS 以使其正确,然后我将其复制并粘贴到 Dreamweaver 中,但一切都很糟糕。
这是它在 Firefox 中应该看起来和确实看起来的样子:
http://postimg.org/image/7gcm1tjxh/
在 Chrome/Dreamweaver 中:
http://postimg.org/image/ikq6ho2dp/
如您所见,顶部导航栏是垂直的,而不是水平的。页脚也在 Chrome 中聚集在一起。
我继续并包含了我所有的代码,因为我可能在另一个元素中指定了一些与其他元素相矛盾的东西。
让菜单恢复水平并且页脚在每个浏览器中看起来正确的解决方案是什么?
@charset "UTF-8";
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
/* HTML5 display-role reset for older browsers */
ol, ul {
list-style: none;
}
html {
background-color:#96d5cd;
}
#container {
width:980px;
border:1px solid #1f5c54;
background-color:white;
margin:2em auto;
}
hr {
padding:0px;
margin:0px;
display:block;
border-bottom: 1px solid black;
clear:both;
}
#footer {
text-decoration:none;
color:black;
text-transform:uppercase;
font-family:amaranth, trebuchet, verdana, sans-serif;
margin-left:12px;
clear:both;
}
#footer li {
display:inline;
clear:both;
}
#footer ul{
margin-left:-37px;
margin-top:-30px;
}
#main {
position:relative;
background-color:#fec161;
height:700px;
margin-top:-10px;
margin-left:10px;
margin-right:10px;
}
#main #content {
margin-top:10px;
margin-left:10px;
margin-right:10px;
height:400px;
text-align:justify;
}
#nav {
text-decoration: none;
color: black;
text-transform: uppercase;
font-family: patua-one;
font-style: normal;
font-weight: 400;
background-color:#fec161;
width:920px;
height:70px;
margin-left:10px;
margin-top:60px;
}
#nav li{
display:inline;
}
#navigation {
margin-left:-30px;
padding-top:15px;
}
#social {
float:right;
}
#social li {
margin-right:10px;
margin-bottom:20px;
display:inline;
}
a {
text-decoration: none;
color: black;
margin-top: 0px;
font-style: normal;
}
a:hover {
text-decoration:none;
color:#1e777b;
}
#feature {
padding-left:10px;
overflow:hidden;
width:960px;
margin-top:-30px;
}
#footer {
font-family:amaranth;
text-decoration:none;
color:black;
text-transform:uppercase;
margin-top:0px;
}
#header {
font-family:patua-one;
text-decoration:none;
color:black;
text-transform:uppercase;
margin-top:0px;
font-size:24px;
}
#header img {
float:left;
margin-left:10px;
margin-top:10px;
}
h1 {
font-size: 24px;
font-family: patua-one;
font-style: normal;
font-weight: 400;
text-transform: uppercase;
padding-top:10px;
}
#column1 {
float:left;
width:275px;
margin-left:10px;
margin-right:30px;
text-align:justify;
}
#column2 h2{
float:left;
width:275px;
margin-left:90px;
}
#column2 {
float:left;
width:275px;
margin-right:0px;
text-align:justify;
margin-left:20px;
}
#column3 {
float:right;
width:275px;
margin-right:10px;
text-align:justify;
}
#column3 h2 {
float:left;
width:275px;
margin-left:220px;
}
h2 {
font-weight: 400;
text-transform: uppercase;
line-height: 100%;
@import url(http://fonts.googleapis.com/css?family=Patua+One);
font-family: patua-one;
font-style: normal;
font-size:24px;
}
#columns {
margin-top:20px;
}
h3 {
font-family:amaranth;
}
div span.welcome {
font-size: 24px;
font-family: patua-one;
font-style: normal;
font-weight: 400;
text-transform: uppercase;
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>WELCOME :: Katie J Hunter :: Graphic Designer</title>
<link ref="css/style.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/images/favicon.ico" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Patua+One">
<!--The following script tag downloads a font from the Adobe Edge Web Fonts server for use within the web page. We recommend that you do not modify it.-->
<script>var __adobewebfontsappname__="dreamweaver"</script>
<script src="http://use.edgefonts.net/patua-one:n4:default;amaranth:n4:default.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="header">
<img src="images/KatieHunterLogo.png" alt="Katie Hunter Graphic Designer Logo" /><br />
<br />
<ul id="social">
<p><li><a href="https://www.facebook.com/pages/Katie-Hunter-Graphic-Designer/1532575640337137" target="_blank"><img src="images/socialmedia_facebook.png" alt="Facebook" /></a></li>
<li><a href="https://www.twitter.com/kinetickatie" target="_blank"><img src="images/socialmedia_twitter.png" alt="Twitter" /></a></li>
<li><a href="https://www.linkedin.com/in/katiejohunter" target="_blank"><img src="images/socialmedia_linkedin.png" alt="Linked In" /></a></li>
</p></ul>
<ul><p>
<div id="navigation">
<li><a href="index.html" target="_blank">Home</a> :: </li>
<li><a href="about.html" target="_blank">About</a> ::</li>
<li><a href="services.html" target="_blank">Services</a> :: </li>
<li><a href="portfolio.html" target="_blank">Portfolio</a> :: </li>
<li><a href="blog.html" target="_blank">Blog</a> :: </li>
<li><a href="contact.html" target="_blank">Contact</a></li>
</div><!-- end navigation --></ul>
</div><!-- end header -->
<div id="feature">
<img src="images/FeatureBanner.jpg" alt="banner" class="banner" /><br>
</div><!-- end feature -->
<div id="main">
<div id="content">
<h1><span class="welcome">Welcome!</span></h1>
<hr style="height:1px; width:100%; border:1px solid black; background-color:black;" />
<h3>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sapien velit, dictum vel semper id, vestibulum eu nisi. Phasellus ac ornare sapien. Praesent eget libero mollis ipsum eleifend lacinia non ut ligula. Sed quis sem at est laoreet aliquet. Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim. Etiam odi o nibh, bibendum vel eros malesuada, elementum blandit quam. Integer aliquet finibus felis et eleifend.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sapien velit, dictum vel semper id, vestibulum eu nisi. Phasellus ac ornare sapien. Praesent eget libero mollis ipsum eleifend lacinia non ut ligula. Sed quis sem at est laoreet aliquet. Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim. Etiam odio nibh, bibendum vel eros malesuada, elementum blandit quam. Integer aliquet finibus felis et eleifend.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sapien velit, dictum vel semper id, vestibulum eu nisi. Phasellus ac ornare sapien. Praesent eget libero mollis ipsum eleifend lacinia non ut ligula. Sed quis sem at est laoreet aliquet. Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim. Etiam odio nibh, bibendum vel eros malesuada, elementum blandit quam. Integer aliquet finibus felis et eleifend.</h3>
</div><!-- end content -->
<div id="columns">
<div id="column1">
<h2>Services</h2>
<hr style="height:1px; width:100%; border:1px solid black; background-color:black;" />
<h3>Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim.</h3>
</div><!-- end column1 -->
<div id="column2">
<h2>Clients</h2>
<hr style="height:1px; width:100%; border:1px solid black; background-color:black;" />
<h3>Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim.</h3>
</div><!-- end column2 -->
<div id="column3">
<h2>Blog</h2>
<hr style="height:1px; width:100%; border:1px solid black; background-color:black;" />
<h3>Donec ornare, ante ut fermentum ullamcorper, enim purus vehicula sem, non feugiat dolor nulla sed enim.</h3>
</div><!-- end column3 -->
</div><!-- end columns -->
</div><!-- end main -->
<div id="footer">
© copyright 2015 katie j hunter • all rights reserved</span>
<ul>
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/index.html" target="_blank">Home</a></li> |
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/about.html" target="_blank">About</a></li> |
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/services.html" target="_blank">Services</a></li> |
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/portfolio.html" target="_blank">Portfolio</a></li> |
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/blog.html" target="_blank">Blog</a></li> |
<li><a href="file:///MacHD/Users/Katie/Desktop/MyNewPortfolio/contact.html" target="_blank">Contact</a></li>
</ul>
</div><!-- end footer -->
</div><!-- end container -->
</body>
</html>
最佳答案
我建议使用引导框架工作。它支持最新的手机和浏览器。
[http://www.bootply.com/4kihU2HqGf][1]
[1]: http://getbootstrap.com/
/* CSS used here will be applied after bootstrap.css *//* CSS used here will be applied after bootstrap.css */
/* CSS used here will be applied after bootstrap.css */
.logo {
width: 210px;
}
.jumbotron {
}
h1.name {
color: #125952;
border-bottom: 4px solid #ffbc6b;
margin-bottom: -19px;
}
.primary {
background-color: #ffbc6b;
border-radius: 1px;
}
.main-content {
background-color: #ffbc6b;
}
.navbar-default .navbar-nav > li > a {
color: #000;
}
.welcome {
border-bottom: 4px solid #000;
color: #000;
padding-bottom: 8px;
}
p {
color: #000;
font-weight: 400px;
}
.columns {
color: #000;
border-bottom: 3px solid #000;
padding-bottom: 8px;
margin-bottom: 8px;
}
section {
background-color: #ffbc6b;
padding: 10px;
}
.row {
background-color: #ffbc6b;
}
.footer {
background-color: #fff;
margin: -12px 0px 0 -44px !important;
}
.navbar-default {
border: none;
}
.copyright{
margin-top: 10px;
}
<div class="container">
<header>
<div class="logo">
<h1 class="name">Katie Hunter</h1>
<h3 class="subtitle">Graphic Designer</h3>
</div><!-- end logo -->
<nav class="navbar navbar-default primary">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="#">HOME :: <span class="sr-only">(current)</span></a></li>
<li><a href="#">ABOUT ::</a></li>
<li><a href="#">SERVICES ::</a></li>
<li><a href="#">PORTFOLIO ::</a></li>
<li><a href="#">BLOG ::</a></li>
<li><a href="#">CONTACT ::</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<!-- end nav -->
</header><!-- header -->
<div class="jumbotron">
<h1>Your images goes here!</h1>
</div>
<div class="container-fluid main-content">
<div class="col-sm-12">
<h1 class="welcome">Welcome</h1>
<p><strong>lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book.
It has survived not only five centuries, but also the leap into electronic
typesetting, remaining essentially unchanged. It was popularised in the 1960s with
the release of Letraset sheets containing Lorem Ipsum passages, and more
recently with desktop publishing
software like Aldus PageMaker including versions of Lorem Ipsum.
It is a long established fact that a reader will be distracted by the
readable content of a page when looking at its layout. The point of using
Lorem Ipsum is that it has a more-or-less normal distribution of letters, as
opposed to using 'Content here, content here', making it look like readable
English. Many desktop publishing packages and web page editors now use Lorem
Ipsum as their default model text, and a search for 'lorem ipsum' will
uncover many web sites still in their infancy. Various versions have
evolved over the years, sometimes by accident, sometimes on purpose
(injected humour and the like).</strong></p>
</div><!-- end of col -->
<div class="col-sm-4">
<h2 class="columns">SERVICES</h2>
<p>lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book.</p>
</div>
<div class="col-sm-4">
<h2 class="columns">SERVICES</h2>
<p>lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book.</p>
</div>
<div class="col-sm-4">
<h2 class="columns">SERVICES</h2>
<p>lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
when an unknown printer took a galley of type and scrambled it to make a type
specimen book.</p>
</div>
</div><!-- end of container-fluid -->
<div class="container copyright">
<div class="col-sm-6 ">
<p>© COPYRIGHT 2015 Katie J Hunter - ALL RIGHTS RESERVED</p>
<nav class="navbar navbar-default">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<ul class="nav navbar-nav footer">
<li><a href="#">HOME <span class="sr-only">(current)</span></a></li>
<li><a href="#">ABOUT</a></li>
<li><a href="#">SERVICES</a></li>
<li><a href="#">PORTFOLIO</a></li>
<li><a href="#">BLOG</a></li>
<li><a href="#">CONTACT</a></li>
</ul>
</div><!-- /.container-fluid --></nav></div>
关于html - 网站在 Firefox 中看起来很棒,在 Chrome 中看起来很差,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28803919/
大家好, 我看到了来自 java 项目中的 jsp 页面。 想问一下这些html标签有什么区别。 请多多指教。 示例代码如下: 最佳答案 使用struts-html标签库,其中只是普
我有一个页面,我正在从电子邮件中读取 HTML。 有时,来自电子邮件的文本包含 HTML 和 CSS,它完全改变了我的页面样式。 我不希望我的页面样式因此受到影响。我如何严格阅读特定 div(框)内的
我知道有类似的问题,但我想对我的特定代码进行一些输入。 我有一个图像,我将其切成 9 块,并创建了一个 3x3 HTML 表来显示它。 但是我的表在行之间有空格,但在列之间没有空格。我没有使用任何 C
编辑:Waylan 的回答成功了!谢谢! 我正在尝试压缩文档的 .html 文件以发送给客户。目标是获得与浏览实际网站相同的体验。 打开 .html 文件时,单击的任何链接都会转到父文件夹,而不是特定
编辑:Waylan 的回答成功了!谢谢! 我正在尝试压缩文档的 .html 文件以发送给客户。目标是获得与浏览实际网站相同的体验。 打开 .html 文件时,单击的任何链接都会转到父文件夹,而不是特定
这是 question 的扩展.我正在尝试解析嵌入在 Blogger 博客的 XML 备份中的 HTML 片段,并用 InDesign 标签重新标记它们。 Blogger 并未对其任何帖子的 HTML
我知道在 html 中元素之间的换行符被视为空格,但我认为当您尝试使用响应式布局时这非常可怕。 例如,这里我们有预期和正确的行为,但要获得它,我必须删除元素之间的 html 中的换行符: https:
我正在尝试将文本文件显示为 html。我正在使用 ionic 。我正在发送一个 html 格式的响应,但在一个文本文件中发送到配置文件页面。它在 .ts 页面的变量名中。 @Component({
假设我有一个 html 文档: test 我想在浏览器中显示该代码。然后我会创建类似的东西: <html>test<html> 为了在中间制作 gubbins,我有一个函数
HTML 元素和 HTML 标签有什么区别?渲染有什么区别吗?使用标签或元素时有什么特殊注意事项吗? 最佳答案 是一个标签,特别是一个开始标签 也是一个标签,一个结束标签 This is a para
我有这个表格的模态形式。该表正在填充大量数据,但我不想分页。相反,我想以模式形式降低表格的高度并为表格添加溢出。下面是我的代码,但它不起作用。 请问我该如何实现? CSS #table{
我记得有一个 Linux 命令可以从给定的 URL 返回 HTML 代码。您可以将 URL 作为此命令的参数,然后返回 HTML 代码,而不是在浏览器中输入 URL。 哪个命令执行此操作? 最佳答案
我有一个 html 页面,我想在其中包含另一个有很多链接的 html 页面。我能够使用 iframe 实现它,但我希望 iframe 内的页面具有与原始页面相同的文本和链接颜色属性,我不想要滚动条,我
我正在使用 HTML 写一本书。如果我把它写在一个 html 文件中,整个代码就会变长,所以我想将每一章保存到不同的文件中,然后将它们加载到主 html 中。我的意思是有像 chapter1.html
在显示之前,我必须将一个网站重定向到另一个网站。我试过使用 .htaccess,但它给我带来了问题。我也使用过 javavscript 和 meta,但在加载我要从中传输的页面之前它不起作用。帮助?
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 7 年前。
如何打印“html”标签,包括“”?如何在不使用文本区域和 Javascript 的情况下对任何标签执行此操作? 最佳答案 使用HTML character references : <html
我需要将 Ruby on Rails 应用程序中的 html.slim 文件转换为 html.erb。有什么简单的方法吗?我尝试了 Stack Overflow 和其他网站中列出的许多选项。但对我没有
这个问题在这里已经有了答案: Is it necessary to write HEAD, BODY and HTML tags? (6 个答案) 关闭 8 年前。 我在 gitHub 上找到了这个
如果不允许通过 JavaScript 进行额外的 DOM 操作,我正在寻找可以加载外部资源的元素列表。我正在尝试使用 HTML 查看器托管来自第三方的电子邮件,当发生这种情况时,我需要删除任何自动加载
我是一名优秀的程序员,十分优秀!