gpt4 book ai didi

html - 垂直导航和 Div 并排

转载 作者:搜寻专家 更新时间:2023-10-31 21:50:18 25 4
gpt4 key购买 nike

我有一个垂直导航和另一个 <div>内容应该在哪里。当我试图定位那些 <div>与另一个并排<div> (文本框)位于主容器下方,无论我尝试了什么,我都无法将其放入其中。我希望你可以帮助我。

HTML

<body>
<!--Main Container-->
<div class="container-main">

<!--Main Navigation-->
<nav class="main-nav">
<ul class="navigation">
<li><a href="#">Home</a></li>
<li><a href="#">Works</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
<?php
include($_GET['site'].".php");
?>
</div>

<!--Thumbnail Navigation-->
<div id="prevthumb"></div>
<div id="nextthumb"></div>

<!--Arrow Navigation-->
<a id="prevslide" class="load-item"></a>
<a id="nextslide" class="load-item"></a>

<div id="thumb-tray" class="load-item">
<div id="thumb-back"></div>
<div id="thumb-forward"></div>
</div>

<!--Time Bar
<div id="progress-back" class="load-item">
<div id="progress-bar"></div>
</div>-->

<!--Control Bar-->
<div id="controls-wrapper" class="load-item">
<div id="controls">

<a id="play-button"><img id="pauseplay" src="img/pause.png"/></a>

<!--Slide counter
<div id="slidecounter">
<span class="slidenumber"></span> / <span class="totalslides"></span>
</div>-->

<!--Slide captions displayed here-->
<div id="slidecaption"></div>

<!--Thumb Tray button-->
<a id="tray-button"><img id="tray-arrow" src="img/button-tray-up.png"/></a>

<!--Navigation-->
<ul id="slide-list"></ul>
</div>
</body>

CSS

/*MAIN BODY STYLING*/

html{
height: 100%;
}
body{
font-family: 'Lato', sans-serif !important;
min-height: 100%;
}

/*MAIN BODY STYING ENDS*/
ul#demo-block{
margin:0 15px 15px 15px;

}
ul#demo-block li{
margin:0 0 10px 0; padding:10px; display:inline; float:left; clear:both; color:#aaa; background:url('styles/bg-black.png'); font:11px Helvetica, Arial, sans-serif;

}
ul#demo-block li a{
color:#eee; font-weight:bold;

}

.container-main{
height: 100%;
margin: 0 auto;
width: 100%;
}

.container-textbox{
background-color: rgba(112,128,144, 0.6);
width: 30em;
height: 20em;

}

.main-nav{
background-color: rgba(192,192,192, 0.3);
}

.navigation{

}

nav {
padding-left: 0;
margin-left: 0;
height: 100%;
width: 250px;
font-size: 11pt;
position: relative;
margin-left: 230px;
}
nav ul {
padding-top:60px;
}

nav li {
margin-bottom:5px;
}

nav a {
color: #fff;
display: block;
width: 100px;
background-color: rgba(192,192,192,0);
text-decoration: none;
text-shadow: 1px 1px 0px #283744;
width: 8em;
line-height:60px;
padding-left:45px;
font-size:20px;
word-spacing:10%;

}
nav li a {
/* In the transition you define the property that
you want a transition attached to and the duration*/
transition: background .3s;
-moz-transition: background .3s; /* Firefox 4 */
-webkit-transition: background .3s; /* Safari and Chrome */
-o-transition: background .5s; /* Opera */
background-color: rgba(0, 0, 0, 0.4);
width:100%;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
text-shadow: 0.5px 0.5px #fff;

}

nav li:last-child a {

}
nav a:hover, nav a:active {
background-color: rgba(112,128,144, 0.4);
}

最佳答案

<body>
<!--Main Container-->
<div class="container-main">

<!--Main Navigation-->
<nav class="main-nav">
<ul class="navigation">
<li><a href="#">Home</a></li>
<li><a href="#">Works</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>


<?php
include($_GET['site'].".php");
?>
</div>

<!--Thumbnail Navigation-->
<div id="prevthumb"></div>
<div id="nextthumb"></div>

<!--Arrow Navigation-->
<a id="prevslide" class="load-item"></a>
<a id="nextslide" class="load-item"></a>

<div id="thumb-tray" class="load-item">
<div id="thumb-back"></div>
<div id="thumb-forward"></div>
</div>

<!--Time Bar
<div id="progress-back" class="load-item">
<div id="progress-bar"></div>
</div>-->

<!--Control Bar-->
<div id="controls-wrapper" class="load-item">
<div id="controls">

<a id="play-button"><img id="pauseplay" src="img/pause.png"/></a>

<!--Slide counter
<div id="slidecounter">
<span class="slidenumber"></span> / <span class="totalslides"></span>
</div>-->

<!--Slide captions displayed here-->
<div id="slidecaption"></div>

<!--Thumb Tray button-->
<a id="tray-button"><img id="tray-arrow" src="img/button-tray-up.png"/></a>

<!--Navigation-->
<ul id="slide-list"></ul>



</div>

</div>
</body>

/主体样式/

        html{
height: 100%;
}
body{
font-family: 'Lato', sans-serif !important;
min-height: 100%;
}
*{

margin: 0;
padding: 0;
list-style: none;
}
/*MAIN BODY STYING ENDS*/
ul#demo-block{
margin:0 15px 15px 15px;

}
ul#demo-block li{
margin:0 0 10px 0; padding:10px; display:inline; float:left; clear:both; color:#aaa; background:url('styles/bg-black.png'); font:11px Helvetica, Arial, sans-serif;

}
ul#demo-block li a{
color:#eee; font-weight:bold;

}

.container-main{
height: 100%;
margin: 0 auto;
width: 100%;
}

.container-textbox{
background-color: rgba(112,128,144, 0.6);
width: 30em;
height: 20em;

}

.main-nav{
background-color: rgba(192,192,192, 0.3);
}

.navigation{

}

nav {
padding-left: 0;
margin-left: 0;
height: 100%;
width: 250px;
font-size: 11pt;
position: relative;
margin-left: 230px;
}
nav ul {
padding-top:60px;
}

nav li {
margin-bottom:5px;
}

nav a {
color: #fff;
display: block;
width: 100px;
background-color: rgba(192,192,192,0);
text-decoration: none;
text-shadow: 1px 1px 0px #283744;
width: 8em;
line-height:60px;
padding-left:45px;
font-size:20px;
word-spacing:10%;

}
nav li a {
/* In the transition you define the property that
you want a transition attached to and the duration*/
transition: background .3s;
-moz-transition: background .3s; /* Firefox 4 */
-webkit-transition: background .3s; /* Safari and Chrome */
-o-transition: background .5s; /* Opera */
background-color: rgba(0, 0, 0, 0.4);
width:100%;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
text-shadow: 0.5px 0.5px #fff;

}

nav li:last-child a {

}
nav a:hover, nav a:active {
background-color: rgba(112,128,144, 0.4);
}

用它替换css和html。希望能成功

关于html - 垂直导航和 Div 并排,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20758719/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com