-
Anonymous
Как заставить все элементы UL остаться в одной линии?
Сообщение
Anonymous »
Я довольно разочарован, потому что я пытаюсь сделать горячую бабу, однако элементы UL иногда разбиты на ряды. /> Код ниже --- < /p>
Код: Выделить всё
.nav a {
color: black;
font-size: 11px;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
}
.nav li {
display: inline;
}
.jumbotron {
background-image:url("");
height: 500px;
background-repeat: no-repeat;
background-size: cover;
}
.jumbotron .container {
position: relative;
top:100px;
}
.nav a {
color: #5a5a5a;
font-size: 11px;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
}
.nav li {
display: inline;
}
.jumbotron {
background-image:url('http://i.imgur.com/3ay8hjS.jpg');
height: 500px;
background-repeat: no-repeat;
background-size: cover;
}
.jumbotron .container {
position: relative;
top:100px;
}
.jumbotron h1 {
color: #fff;
font-size: 48px;
font-family: 'Shift', sans-serif;
font-weight: bold;
}
.jumbotron p {
font-size: 20px;
color: #fff;
}
.learn-more {
background-color: #f7f7f7;
}
.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px;
font-weight: bold;
}
.learn-more a {
color: #00b0ff;
}
.neighborhoood-guides {
background-color: #efefef;
border-bottom: 1px solid #dbdbdb
}
.clearfix:after {
display:block;
clear:both;
}
/*----- Menu Outline -----*/
.menu-wrap {
width:100%;
box-shadow:0px 1px 3px rgba(0,0,0,0.2);
background:#fff;
}
.menu {
width:1000px;
margin:0px auto;
}
.menu li {
margin:0px;
list-style:none;
}
.menu a {
transition:all linear 0.15s;
color:black;
}
.menu li:hover > a, .menu .current-item > a {
text-decoration:none;
color:dodgerblue;
}
.menu .arrow {
font-size:11px;
line-height:0%;
}
/*----- Top Level -----*/
.menu > ul > li {
float:left;
display:inline-block;
position:relative;
font-size:11px;
}
.menu > ul > li > a {
padding:10px 40px;
display:inline-block;
text-shadow:0px 1px 0px rgba(0,0,0,0.4);
text-transform:uppercase;
font-weight:bold;
}
.menu > ul > li:hover > a, .menu > ul > .current-item > a {
background:#fff;
}
/*----- Bottom Level -----*/
.menu li:hover .sub-menu {
z-index:1;
opacity:1;
}
.sub-menu {
width:160%;
padding:5px 0px;
position:absolute;
top:100%;
left:0px;
z-index:-1;
opacity:0;
transition:opacity linear 0.15s;
box-shadow:0px 2px 3px rgba(0,0,0,0.2);
background:#fff;
}
.sub-menu li {
display:block;
font-size:11px;
}
.sub-menu li a {
padding:10px 30px;
display:block;
text-transform: uppercase;
font-weight:bold
}
.sub-menu li a:hover, .sub-menu .current-item a {
background:#fff;
}< /code>
[list]
[*]
[url=#]Destinations ▼[/url]
[url=#]Airlines[/url]
[*][url=#]Hotels[/url]
[/list]
[*][url=#]Home[/url]
[*][url=#]About Us[/url]
[*][url=#] Contact Us[/url]
[*]
[url=#]Cruiselines[/url]
[*][url=#]Weddings & Honeymoons[/url]
[*]
[url=#]Useful Information ▼[/url]
[list]
[url=#]Travel Insurance[/url]
[*][url=#]Careers[/url]
[/list]
Find the vacation you deserve.
--- Insert mouth-watering description here ---
Neighborhood Guides
Not sure where to stay? We've created neighborhood guides for cities all around the world.
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
Travel
From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.
[url=#][/url]
Host
[url=#][/url]
Trust and Safety
[url=#][/url]
Подробнее здесь:
https://stackoverflow.com/questions/324 ... n-one-line
1756595795
Anonymous
Я довольно разочарован, потому что я пытаюсь сделать горячую бабу, однако элементы UL иногда разбиты на ряды. /> Код ниже --- < /p>
[code].nav a {
color: black;
font-size: 11px;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
}
.nav li {
display: inline;
}
.jumbotron {
background-image:url("");
height: 500px;
background-repeat: no-repeat;
background-size: cover;
}
.jumbotron .container {
position: relative;
top:100px;
}
.nav a {
color: #5a5a5a;
font-size: 11px;
font-weight: bold;
padding: 14px 10px;
text-transform: uppercase;
}
.nav li {
display: inline;
}
.jumbotron {
background-image:url('http://i.imgur.com/3ay8hjS.jpg');
height: 500px;
background-repeat: no-repeat;
background-size: cover;
}
.jumbotron .container {
position: relative;
top:100px;
}
.jumbotron h1 {
color: #fff;
font-size: 48px;
font-family: 'Shift', sans-serif;
font-weight: bold;
}
.jumbotron p {
font-size: 20px;
color: #fff;
}
.learn-more {
background-color: #f7f7f7;
}
.learn-more h3 {
font-family: 'Shift', sans-serif;
font-size: 18px;
font-weight: bold;
}
.learn-more a {
color: #00b0ff;
}
.neighborhoood-guides {
background-color: #efefef;
border-bottom: 1px solid #dbdbdb
}
.clearfix:after {
display:block;
clear:both;
}
/*----- Menu Outline -----*/
.menu-wrap {
width:100%;
box-shadow:0px 1px 3px rgba(0,0,0,0.2);
background:#fff;
}
.menu {
width:1000px;
margin:0px auto;
}
.menu li {
margin:0px;
list-style:none;
}
.menu a {
transition:all linear 0.15s;
color:black;
}
.menu li:hover > a, .menu .current-item > a {
text-decoration:none;
color:dodgerblue;
}
.menu .arrow {
font-size:11px;
line-height:0%;
}
/*----- Top Level -----*/
.menu > ul > li {
float:left;
display:inline-block;
position:relative;
font-size:11px;
}
.menu > ul > li > a {
padding:10px 40px;
display:inline-block;
text-shadow:0px 1px 0px rgba(0,0,0,0.4);
text-transform:uppercase;
font-weight:bold;
}
.menu > ul > li:hover > a, .menu > ul > .current-item > a {
background:#fff;
}
/*----- Bottom Level -----*/
.menu li:hover .sub-menu {
z-index:1;
opacity:1;
}
.sub-menu {
width:160%;
padding:5px 0px;
position:absolute;
top:100%;
left:0px;
z-index:-1;
opacity:0;
transition:opacity linear 0.15s;
box-shadow:0px 2px 3px rgba(0,0,0,0.2);
background:#fff;
}
.sub-menu li {
display:block;
font-size:11px;
}
.sub-menu li a {
padding:10px 30px;
display:block;
text-transform: uppercase;
font-weight:bold
}
.sub-menu li a:hover, .sub-menu .current-item a {
background:#fff;
}< /code>
[list]
[*]
[url=#]Destinations ▼[/url]
[url=#]Airlines[/url]
[*][url=#]Hotels[/url]
[/list]
[*][url=#]Home[/url]
[*][url=#]About Us[/url]
[*][url=#] Contact Us[/url]
[*]
[url=#]Cruiselines[/url]
[*][url=#]Weddings & Honeymoons[/url]
[*]
[url=#]Useful Information ▼[/url]
[list]
[url=#]Travel Insurance[/url]
[*][url=#]Careers[/url]
[/list]
Find the vacation you deserve.
--- Insert mouth-watering description here ---
Neighborhood Guides
Not sure where to stay? We've created neighborhood guides for cities all around the world.
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
[img]https://i.sstatic.net/M6U3Oodp.png[/img]
Travel
From apartments and rooms to treehouses and boats: stay in unique spaces in 192 countries.
[url=#][/url]
Host
[url=#][/url]
Trust and Safety
[url=#][/url]
[/code]
Подробнее здесь: [url]https://stackoverflow.com/questions/32413269/how-do-i-force-all-ul-elements-to-stay-in-one-line[/url]