CSS/HTML-Chrome中的字间距不起作用
所以我搜索了其他线程,但没有找到答案。我觉得我的问题有点奇怪。我正在尝试为我的导航链接做大约10px到15px的字间距。当我通过打开索引文件在本地测试页面时,它就工作了。但一旦我上传到cpanel,它就不起作用了 CSS:CSS/HTML-Chrome中的字间距不起作用,html,css,google-chrome,word,spacing,Html,Css,Google Chrome,Word,Spacing,所以我搜索了其他线程,但没有找到答案。我觉得我的问题有点奇怪。我正在尝试为我的导航链接做大约10px到15px的字间距。当我通过打开索引文件在本地测试页面时,它就工作了。但一旦我上传到cpanel,它就不起作用了 CSS: 它不起作用的原因是您正在使用元素。此元素已过时。您应该使用CSS来确定它的位置(您可以将文本对齐:居中;放在上。导航)不要使用过时的元素。一旦这样做,字间距就可以正常工作 并帮助检查您的页面是否存在人类容易忽略的语法错误。它们是人们开发网站的宝贵工具。你的问题有点模糊!!!!
它不起作用的原因是您正在使用
元素。此元素已过时。您应该使用CSS来确定它的位置(您可以将文本对齐:居中;
放在上。导航
)不要使用过时的元素。一旦这样做,字间距
就可以正常工作
并帮助检查您的页面是否存在人类容易忽略的语法错误。它们是人们开发网站的宝贵工具。你的问题有点模糊!!!!你能再解释一遍吗?是的,对不起。所以我设置了导航链接,每个单词之间有15px的空格。航行{字间距:15px;高度:30px;背景色:#66CCFF;页边距顶部:5px;页边距右侧:150px;页边距底部:5px;页边距左侧:150px;边框:1px实心;边框颜色:#FFCC66;溢出:可见;最小宽度:800px;最小高度:30px;但基本上不起作用。由于某种原因,当我在chrome中查看它时,它可以工作。但如果我将它加载到cpanel然后它就不起作用了。让我发布屏幕截图。这是我实际上传它时的样子:这是我上传它之前的样子:这是“加载到cpanel”部分没有太大意义。一旦你上传它,你用什么URL来查看页面?URL是melissaj.cityusettle.net(在你问之前,不,这实际上不是家庭作业,他们给了我一个班级的账户,为什么不使用它呢?xD)好的,我试过了,但由于某些原因,它不起作用。我将在另一台计算机上使用相同的浏览器进行尝试。我正在查看您的页面,它工作正常。是否缓存?这是开发网站的规则1:清除缓存。感谢您提供的链接!不幸的是,我在另一台计算机上进行了检查,结果是一样的。可能是这样Cpanel有问题吗?它在IE中工作似乎很奇怪。我清除了缓存并解决了同样的问题。如果你只是从计算机上用chrome打开它,它就可以工作。但是一旦文件上传,它就不工作了。到目前为止,左边空白处的建议是唯一有效的建议。它肯定有效:这是你的网站,我编辑了
字间距使用Inspector来确定它是否正常工作。Chrome&FF没有问题。^然后wtf正在我的计算机上运行):IE和Firefox都正常工作,但Chrome没有。我的代码中还有其他错误吗?
/* Body and Container Styles */
body {
background - color: #C8C8C6;
min - width: 50 % ;
}
container {
margin - left: auto;
margin - right: auto;
width: 100 % ;
min - width: 1340px;
}
/* Div styles */
div {
border - radius: 10px;
overflow: visible;
}
.navigation {
word - spacing: 15px;
height: 30px;
background - color: #66CCFF;
margin-top: 5px;
margin-right: 150px;
margin-bottom: 5px;
margin-left: 150px;
border: 1px solid;
border-color: # FFCC66;
overflow: visible;
min - width: 800px;
min - height: 30px;
}
ul {
list - style - type: none;
margin - top: 2px;
margin - bottom: 5px;
padding: 0;
font - size: x - large;
}
li {
display: inline;
}
.left {
background - color: #FFCC66;
border: 2px dashed;
border - color: #66CCFF;
margin-top:10px;
height: 250px;
width: 100px;
min-height: 500px;
min-width: 200px;
float:left;
overflow: visible;
}
.right{
display: inline-block;
background-color: # FFCC66;
border: 2px dashed;
border - color: #66CCFF;
margin-top:10px;
height: 500px;
width: 200px;
min-height: 250px;
min-width: 100px;
float: right;
overflow: visible;
}
.middle {
display: inline-block;
margin-left: 5%;
background-color: # FFCC66;
border: 2px dashed;
border - color: #66CCFF;
margin-top:10px;
height: 500px;
width: 800px;
min-height: 250px;
min-width: 400px;
overflow: scroll;
}
/* footer style */
footer {
height: 20px;
background - color: # 66CCFF;
margin - top: 10px;
margin - right: 150px;
margin - bottom: 5px;
margin - left: 150px;
border: 1px solid;
border - color: #FFCC66;
overflow: visible;
}
footer p {
margin: auto;
margin - top: 2px;
margin - left: 5px;
font - size: x - small;
text - align: left;
}
/* Media styles */
embed {
margin - top: 20px;
}
/* Heading Styles */
h1 {
text - align: center;
font - family: Impact,
Charcoal,
sans - serif;
}
/* link styles */
a: link {
text - decoration: none;
}
a: visited {
color: white;
}
a: hover {
color: #C8C8C6;
}
/* Paragraph and Text styles */
p {
text - align: center;
}
/* Scrollbar */
::-webkit - scrollbar {
width: 10px;
}
::-webkit - scrollbar - track {
-webkit - box - shadow: inset 0 0 6px rgba(200, 200, 198, 1);
border - radius: 7px;
}
::-webkit - scrollbar - thumb {
border - radius: 7px; - webkit - box - shadow: inset 0 0 6px rgba(71, 211, 255, 1);
}