css - 找不到菜单栏 css 来更改文本

标签 css

我无法让我的菜单栏更改字体。我是在 Dreamweaver 中制作的,所以菜单栏有很多额外的 css 代码,但我已经尝试了所有我能想到的选项,但我仍然无法访问菜单栏中的文本来更改字体或颜色或任何东西.

这是 html:

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Australian Design Architects</title>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<link href="ADA.css" rel="stylesheet" type="text/css" />

<!--[if lt IE 9]><script src="javascript/html5.js"></head>script><![endif] -->
</head>
<body>
<div id="main">
<header>
<h1 id="hheading">Australian Design Architects</h1>
<img src="logo2.gif" alt="ADA LOGO" width="130" height="130" id="himg" />
<nav>
<ul id="MenuBar1" class="MenuBarHorizontal">
<li><code><a href="#"> <!--id="home"-->Home</a></code></li>
<li><code><a href="#" class="MenuBarItemSubmenu">Portfolio</a>
    <ul>
      <li><a href="#">Commercial</a></li>
      <li><a href="#">Residential</a></li>
      <li><a href="#">Heritage</a></li>
      <li><a href="#">Rennovations/Additions</a></li>
    </ul>
</code></li>
<li><code><a href="#">Services</a> </code>      </li>
<li><a href="#"><code>About Us</code></a></li>
<li><a href="#"><code>Contact us</code></a></li>
</ul>
</nav>
</header>
<p>&nbsp; </p>
<p>&nbsp; </p>
<div id="maincontent">
<article id="inner"></article>
<img src="3drender.png" alt="3d render" name="mimg" width="640" height="480" id="mimg"></div>
<footer>
<div id="fbtw">Content for  id "fbtw" Goes Here</div>
<ul>
<li><p><a href="#">Privacy Statement</a></p></li>
<li><p><a href="#">Accessability Statement</a></p></li>
<li><p><a href="#">Site Map</a></p></li></ul>
<p>&copy; Samuel Martin 2014. All Rights Reserved.</p>
</footer>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1",       {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</div>

这是CSS:

@charset "utf-8";
/* CSS Document */

@font-face {
font-family: 'flux_architect_regular';
src: url('flux_architect_regular-webfont.eot');
src: url('flux_architect_regular-webfont.eot?#iefix') format('embedded-opentype'),
     url('flux_architect_regular-webfont.woff') format('woff'),
     url('flux_architect_regular-webfont.ttf') format('truetype'),
     url('flux_architect_regular-webfont.svg#flux_architectregular') format('svg');
font-weight: normal;
font-style: normal;
}

@font-face {
font-family: 'monospacetypewriterregular';
src: url('monospacetypewriter-webfont.eot');
src: url('monospacetypewriter-webfont.eot?#iefix') format('embedded-opentype'),
     url('monospacetypewriter-webfont.woff') format('woff'),
     url('monospacetypewriter-webfont.ttf') format('truetype'),
     url('monospacetypewriter-webfont.svg#monospacetypewriterregular') format('svg');
font-weight: normal;
font-style: normal;
}

*{
margin:0;
padding:0;
}

article, aside, figure, footer, header, nav, section{
display:block;
}

body {
font-family:'monospacetypewriterregular', sans-serif;
color: #999;
width: 1024px;
margin-top: 20px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
border: 3px dotted #6a8c3f; /*1764fc 323aea*/
background-color:#666;
}

#main{
background-color:#fff;
/*box-shadow: 0 0 25px 5px #1764fc; 00aae4 */
}

#himg {
float: left;
padding-top: 10px;
padding-left: 10px;
}


nav {   
font-size: 18px;
position: absolute;
padding-top: 50px;
padding-left: 140px;
padding-bottom:50px;
}

footer {
font-size: 12px;
line-height: 1.5em;
color: #999;
clear: both;
padding-top: 10px;
padding-bottom: 10px;
text-align: center;
}

footer li {
display: inline-block;
position:relative;
margin-left:10px;
margin-right:10px;

}

footer p {
margin-bottom: 5px;
}

footer a {
color: #999;
}

#hheading {
position: absolute;
top: -500px;
}

#maicontent {
float: left;
width: 700px;
border: 1px solid #999;
padding-top:50px;
margin-top:106px;
}

我需要把那个字体改过来。请帮忙。

最佳答案

将此添加到您的 CSS

// This removes the unordered list circle
nav ul{
    list-style-type:none;
}
// this floats the element inline
nav ul li
{
    float:left;
    display:inline-block;
}
// This is used to remove the underline and give effects to the text
nav li a
{
    font-family:'monospacetypewriterregular', sans-serif;
    text-decoration:none;
}

Fiddle Demo here..!!

关于css - 找不到菜单栏 css 来更改文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22573116/

相关文章:

asp.net - 更改代码隐藏中重复器元素的样式?

jquery - CSS3 动画填充模式 polyfill

html - Chrome 在悬停元素上闪烁空白

html - 使用 <a> 标签的可点击 <li> - 无需使用 JS。它是合法的 HTML 吗?

html - 具有填充模式的 CSS 动画包括过渡在 Firefox 中无法正常工作

html - 导航栏链接的填充区域不可点击

javascript - 如何删除和附加元素 li?

html - Flex 表 CSS 截断问题

html - 如何防止选择菜单选项在被选中时突出显示?

html - 列表不继承外部 div CSS 的样式