English 中文(简体)
CSS 在法里拥有最高差价的问题
原标题:CSS issue with top margin in safari

我可以拿起一个顶点,以显示一下。 社区服务公司进行罚款,而独木板有顶端,以火ox和其他浏览器为中心,但不是在法里。

I would like a 10px space to show above the container which will hold all other content.

The CSS:

/* CSS Document */

body {

    color: #000000; /*This sets all text to Black*/
    /*background-color: #FFFFFF; /*This sets the bacground to white*/
    margin: 100px auto; /*This sets the margin to zero*/
    padding:0;
    font-size:12px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    text-align:center;
}
p {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #000000;
}
h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000099;
}
h2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000099;
}
h3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #000099;
}
.redtext {
    color: #FF0000;
}
a {
    color: #009900;
}
a:link {
    color: #000099;
    text-decoration: underline;
}
a:visited {
    color: #666666;
    text-decoration: none;

}
a:hover {
    text-decoration: none;
    background-color: #CCCCCC;
}
a:active {
    text-decoration: none;

}

.menu {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #000000;
}
.menu a:link {
    color: #336600;
    text-decoration: none;
}
.menu a:visited {
    color: #666666;
    text-decoration: none;
}

.menu a:hover {
    color: #990000;
    text-decoration: none;
}

.menu a:active {
    color: #666666;
    text-decoration: none;
}
div#container {
    width: 960px;
    height:760;
    overflow:auto;
    /*margin-left:0 auto; /* the auto value on the sides, coupled with the width, centers the layout */

}
div#outer {
    margin-left: auto;
    margin-right: auto;
    width: 960px;
}
div#header {
    position:relative;
    text-align: center;
    width: auto;
}
div#nav {
    width: auto;
    padding: 10px;
    margin-top: 1px;
    position:relative;
}
div#main {
    position:relative;
    width: auto;
}
div#footer {
    position:relative;
    width:auto;
    padding: 15px;
    margin: 0px;
}#nav {
    position: relative;
    padding:20px;
    width: auto;
}
问题回答

你或许想设定差额:10px汽车;顶层。 我通常这样做:

body {
 text-align: center;
 padding: 0;
 margin: 0;
}

#container {
  width: 960px;
  height: 760px;
  text-align: left;
  margin: 10px auto;
}

......假定“ #”是第一点内容,应当予以解决。

你们还可能想尝试把档案重新编到那里。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

Drop down background url in Safari Issue

selectBox.selectCSS { background: url(/Images/replacementSelectBackground.png) top left no-repeat height:auto; } I have an issue in Safari only where the image is not rendering on top ...

CSS specific for Safari

How do you target specifically safari in css with styles?

Aligning textarea in a form

Ive used the following css code to align my form elements: form { position:relative; } form input { position:absolute; left:11em; } However, the textarea element is not aligned correctly with the ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

CSS problem with page footer

I have defined my page footer in the css file as: #footer { position: absolute; height: 50px; text-align: center; background: #66CCCC; bottom: 0px; left: 0px; width: 100%; height: ...

热门标签