Отступы строки меню и пространства содержимого с правой стороны бесконечны.CSS

Разбираемся в CSS
Ответить
Гость
 Отступы строки меню и пространства содержимого с правой стороны бесконечны.

Сообщение Гость »


Я пытаюсь выровнять строку меню и пространство по бокам контента. Проблема в том, что правая часть строки меню и пространство для содержимого не оставляют бокового пространства. Я хочу дать им немного места, например, с левой стороны. Вот мой CSS и HTML-код:

Код: Выделить всё

body {

background-color: #7c8da2;
background-image: linear-gradient(#0b3262, #7c8da2);
}

#bannerPx {
padding: 0;
}

/* Banner Wrapper */
#banner {
position: relative;
top: 0;
/*background-image: linear-gradient(to right, #fff, #C8102E, #C8102E);*/
display: block;
/*float: left;*/
width: 250px;
height: 40px;
z-index: 10;
background-color: #f2fed1;
}

/* Banner Text */
#banner_text {
position: absolute;
text-aligh: center;
padding-left: 5%;
width: 60%;
height: 100%;
top: 45%;
/*right: 300px;*/
transform: translate(0, -50%);
/*padding: 10px;*/
font: bold 36px Century Gothic;  /* Banner Text Font */
color: #000000;            /* Banner Text Colour */
z-index: 11;
}
#banner_text2 {
position: absolute;
text-aligh: center;
padding-left: 65%;
width: 40%;
height: 100%;
top: 45%;
transform: translate(0, -50%);
font: bold 34px Century Gothic;  /* Banner Text Font */
color: #00c000;            /* Banner Text Colour */
z-index: 11;
}

#bannerimg {
height: 100%;
}

#bannerIncludePx {
height: 100%;
position: relative;
}

#content {
overflow: hidden;
z-index: 9999;
}

#content iframe {
margin: 35px 0px auto;
padding: 0;
width: 1917px;
height: 870px;
z-index: 300;
background-color: #7c8da2;
}

#console {
height: 150px;
margin-top: 0px;
overflow: auto;
}

#console iframe {
width: 100%;
z-index: 200;
}

nav {
margin: 0px 0px auto;
position: relative;
z-index: 2;
}

ul li img {
margin-left: -20px;
padding-right: 10px;
vertical-align: middle;
}

#ci_wrapper {
margin: 0 auto;
width: 1900px;
}

#menu, #menu ul {
margin: 0;
padding: 0;
list-style: none;
}

#menu {
margin: 0px auto;
padding: 0px;
/*border: 0px solid #BDBDBD;*/
background-color: #f2fed1;
/*background-image: linear-gradient(#BDBDBD, #BDBDBD);*/
border-radius: 0px;
box-shadow: 0 1px 1px #777;
position: absolute;
z-index: 1;
width: 1900px;
}

#menu:before,
#menu:after {
content: "";
display: table;
}

#menu:after {
clear: both;
}

#menu {
zoom:1;
}

#menu li {
float: left;
/*border: 1px solid #404040;
box-shadow: 1px 0 0 #BDBDBD;*/
position: relative;
}

#menu a {
float: left;
padding: 10px 30px;
color: #212121;
text-transform: none;
font: bold 15px Segoe UI;
text-decoration: none;
}

#menu li:hover > a {
color: #73726e;
background-image: linear-gradient(#CAD6E6, #CAD6E6);
}

#menu li:hover > a svg {
transform: rotate(180deg);
}

*html #menu li a:hover { /* IE6 only */
color: #b6c3d4;
}

#menu ul {
margin: 20px 0 0 0;
_margin: 0; /*IE6 only*/
opacity: 0;
visibility: hidden;
position: absolute;
top: 34px;
left: 0;
z-index: 1;
background: #BDBDBD;
background: linear-gradient(#c8d4e3, #c8d4e3);
box-shadow: 0 -1px 0 rgba(255,255,255,.3);
border-radius: 0px;
transition: all .5s ease-in-out;
}

#menu li:hover > ul {
opacity: 1;
visibility: visible;
margin: 0;
}

#menu ul ul {
top: 0;
left: 100%;
margin: 0 0 0 20px;
_margin: 0; /*IE6 only*/
box-shadow: -1px 0 0 rgba(255,255,255,.3);
}

#menu ul li {
float: none;
display: block;
border: 0;
_line-height: 0; /*IE6 only*/
box-shadow: 0 0px 0 #111, 0 0px 0 #666;
}

#menu ul li:last-child {
box-shadow: none;
}

#menu ul a {
padding: 10px 25px;
_height: 10px;  /*IE6 only*/
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}

#menu ul a:hover {
background-image: linear-gradient(#CAD6E6, #CAD6E6);
color : #a2a4a6;
font-size :14.5px;
}
#menu li a:hover {
background-image: linear-gradient(#CAD6E6, #CAD6E6);
color : #a2a4a6;
}

#menu ul li:first-child > a {
border-radius: 0px 0px 0 0;
}

#menu ul li:first-child > a:after {
content: '';
position: absolute;
left: 40px;
top: -6px;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #CAD6E6;
}

#menu ul ul li:first-child a:after {
left: -6px;
top: 50%;
margin-top: -6px;
border-left: 0;
border-bottom: 6px solid transparent;
border-top: 6px solid transparent;
border-right: 6px solid #CAD6E6;
}

#menu ul li:first-child a:hover:after {
border-bottom-color: #CAD6E6;
}

#menu ul ul li:first-child a:hover:after {
border-right-color: #424242;
border-bottom-color: transparent;
}

#menu ul li:last-child > a {
border-radius: 0 0 0px 0px;
}

/* Mobile */
#menu-trigger { /* Hide it initially */
display: none;
}

@media screen and (max-width: 600px) {

#menu-wrap {
position: relative;
}

#menu-wrap * {
box-sizing: border-box;
}

#menu-trigger {
display: block; /* Show it now */
height: 40px;
line-height: 40px;
cursor: pointer;
padding: 0 0 0 35px;
border: 1px solid #BDBDBD;
color: #9E9E9E;
font-weight: bold;
background-color: #fff;
/* Multiple backgrounds here, the first is base64 encoded */
background: url(data:image/png;base64,iVBOR...) no-repeat 10px center, linear-gradient(#BDBDBD, #111);
border-radius: 6px;
box-shadow: 0 1px 1px #777, 0 1px 0 #666 inset;
}

#menu {
margin: 0; padding: 10px;
position: absolute;
top: 40px;
width: 100%;
z-index: 1;
display: none;
box-shadow: none;
}

#menu:after {
content: '';
position: absolute;
left: 25px;
top: -8px;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
border-bottom: 8px solid #BDBDBD;
}

#menu ul {
position: static;
visibility: visible;
opacity: 1;
margin: 0;
background: none;
box-shadow: none;
}

#menu ul ul {
margin: 0 0 0 20px !important;
box-shadow: none;
}

#menu li {
position: static;
display: block;
float: none;
border: 0;
margin: 5px;
box-shadow: none;
}

#menu ul li{
margin-left: 20px;
box-shadow: none;
}

#menu a{
display: block;
float: none;
padding: 0;
color: #212121;
}

#menu a:hover{
color: #9E9E9E;
}

#menu ul a{
padding: 0;
width: auto;
}

#menu ul a:hover{
background: none;
}

#menu ul li:first-child a:after,
#menu ul ul li:first-child a:after {
border: 0;
}

}

@media screen and (min-width: 600px) {
#menu {
display: block !important;
}
}

/* iPad */
.no-transition {
transition: none;
opacity: 1;
visibility: visible;
display: none;
}

#menu li:hover > .no-transition {
display: block;
background-color: #b6c3d4;
}
svg {
transition: transform 0.5s ease;
overflow: hidden;
}
#menu li a img {
float: left;
}

/*a svg:hover {
transform: rotate(180deg);
}
#dropdown, #sub-dropdown fa.glyphicon.fa-angle-right{
transform:rotate(90deg);
}

a.dropdown >  ul.sub-dropdown:hover a i.fa{
transform:rotate(90deg);
}
*/

Код: Выделить всё

    


[list]

[*]

TTTT



[*]
[url=#]AHU


[/url]



[url=#]Sensors


[/url]

[list]

[url=#]Users


[/url]

[list]

User Management

[*]
User Activities

[/list]




[*]
Help



[*]
Log Out












Источник: https://stackoverflow.com/questions/781 ... is-endless
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «CSS»