我不希望侧边栏显示OVERLAP图像。 所以基本上我想要它们,并排,我认为问题在于我有一个位置:绝对;在侧边栏中,但是当我将其移除时,侧边栏和图像不会保留在原位。
body {
text-decoration: none;
margin: 0 auto;
max-width: 100% !important;
height: auto;
}
.fundo img {
max-width: 100% !important;
height: auto;
}
.menuleft {
background-color: #CDD0D2;
list-style-type: none;
position: absolute;
width: 9%;
height: 100%;
display: table;
}
.menuleft ul {
display: table-cell;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
vertical-align: middle;
}
#text {
-webkit-box-shadow: inset -7px 4px 5px 0px rgba(0, 0, 0, 0.22);
-moz-box-shadow: inset -7px 4px 5px 0px rgba(0, 0, 0, 0.22);
box-shadow: inset -7px 4px 5px 0px rgba(0, 0, 0, 0.22);
width: 100%;
height: 17%;
color: white;
text-align: center;
text-decoration: none;
background-color: #F06D22;
}
.menuleft li a {
font-family: Futura LT, 'Trebuchet MS', Arial;
letter-spacing: 0.28vw;
color: #fff;
text-decoration: none;
height: 100%;
text-align: center;
display: flex;
vertical-align: middle;
align-items: center;
justify-content: center;
width: 100%;
writing-mode: tb-rl;
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-o-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
white-space: nowrap;
}
.menuleft li:hover {
text-decoration: none;
background: rgba(255, 255, 255, 0.2);
}
.menuleft li a:hover {
text-decoration: none;
color: #fff;
}
#whitebar {
text-decoration: none;
display: table;
width: 100%;
height: 3px;
background-color: #fff;
writing-mode: tb-rl;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(180deg);
white-space: nowrap;
bottom: 0;
margin: 0 auto;
}
.image {
width: 92%;
height: 100%;
}
.image img {
width: 100%;
height: 100%;
}
<div class="menuleft">
<ul>
<li id="text">
<a href="#">Eficácia</a>
</li>
<li id="whitebar">
</li>
<li id="text">
<a href="#">Rapidez</a>
</li>
<li id="whitebar">
</li>
<li id="text">
<a href="#">Impacto <br> na vida real</a>
</li>
<li id="whitebar">
</li>
<li id="text">
<a href="#">Tecnologia <br> avançada</a>
</li>
<li id="whitebar">
</li>
<li id="text">
<a href="#">Segurança</a>
</li>
</ul>
</div>
<div class="image">
<img src="https://image.freepik.com/free-vector/modern-abstract-background_1048-1003.jpg" />
</div>
答案 0 :(得分:0)
将浮动属性添加到.image类
.image { float:right; }
答案 1 :(得分:0)
您正在使用&#34;类&#34; CSS上的(。)标记而不是&#34; id&#34; (#)标记,所以尝试更改所有&#34; id&#34; HTML上的标记为#34; class&#34;。像这样:
<body>
<div class="menuleft">
<ul>
<li class="text">
<a href="#">Eficácia</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Rapidez</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Impacto <br> na vida real</a>
</li>
<li id="whitebar">
</li>
<li class="text">
<a href="#">Tecnologia <br> avançada</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Segurança</a>
</li>
</ul>
</div>
<div class="image">
<img src="https://image.freepik.com/free-vector/modern-abstract-background_1048-1003.jpg" />
</div>
答案 2 :(得分:0)
根据以下DEMO 2
中的评论理解更新了演示css更改
.menuleft {
background-color: #CDD0D2;
list-style-type: none;
/*position: absolute;*/
width: 9%;
height: 100%;
/*display: table;*/
float: left; /* float to left */
}
.menuleft ul {
/*display: table-cell;*/ /* remove this */
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
vertical-align: middle;
}
.menuleft li a {
font-family: Futura LT, 'Trebuchet MS', Arial;
letter-spacing: 0.28vw;
color: #fff;
text-decoration: none;
/*height: 100%;*/
text-align: center;
display: flex;
vertical-align: middle;
align-items: center;
justify-content: center;
width: 100%;
writing-mode: tb-rl;
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-o-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
white-space: nowrap;
}
.image {
width: 91%; /* remaining space */
height: 100%;
float: right; /* add this to float it to right */
}
答案 3 :(得分:0)
在你的css上试试这个:
Option Explicit
Sub main()
Dim namesRng As Range
Dim f As Range, cell As Range
With Worksheets("Names") '<-- change "Names" with actual name of your sheet with the list of names
Set namesRng = .Range("A1", .Cells(.Rows.Count, 1).End(xlUp)) '<--| get the list of names form cell A1 down to last non empty row
End With
With Workbooks.Open("C:\Users\...\data.csv").Worksheets(1).UsedRange.Columns(1) '<-- open your CSV file and refer to "used" cells in its column "A"
For Each cell In namesRng '<-- loop through names list
Set f = .Find(what:=cell.value, LookIn:=xlValues, lookat:=xlWhole) '<-- try finding current name in referenced range of csv file
If Not f Is Nothing Then cell.Offset(, 1).Resize(, 2).value = f.Offset(, 1).Resize(, 2).value '<--| if found, then write its two adjacent cells values next to current name ones
Next cell
End With
ActiveWorkbook.Close False
End Sub
答案 4 :(得分:0)
body{
text-decoration: none;
margin: 0 auto;
max-width:100% !important;
height:auto;
}
.fundo img{
max-width:100% !important;
height:auto;
}
.menuleft {
background-color: #CDD0D2;
list-style-type: none;
position: absolute;
width: 9%;
height: 100%;
display: table;
}
.menuleft ul{
display: table-cell;
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
vertical-align: middle;
}
.text {
-webkit-box-shadow: inset -7px 4px 5px 0px rgba(0,0,0,0.22);
-moz-box-shadow: inset -7px 4px 5px 0px rgba(0,0,0,0.22);
box-shadow: inset -7px 4px 5px 0px rgba(0,0,0,0.22);
width: 100%;
height: 17%;
color: white;
text-align: center;
text-decoration: none;
background-color: #F06D22;
}
.menuleft li a {
font-family: Futura LT,'Trebuchet MS', Arial;
letter-spacing: 0.28vw;
color: #fff;
text-decoration: none;
height: 100%;
text-align: center;
display: flex;
vertical-align: middle;
align-items: center;
justify-content: center;
width: 100%;
writing-mode: tb-rl;
-webkit-transform:rotate(180deg);
-moz-transform:rotate(180deg);
-o-transform: rotate(180deg);
-ms-transform:rotate(180deg);
transform: rotate(180deg);
white-space:nowrap;
}
.menuleft li:hover {
text-decoration: none;
background: rgba(255,255,255,0.2);
}
.menuleft li a:hover {
text-decoration: none;
color: #fff;
}
.whitebar{
text-decoration: none;
display: table;
width: 100%;
height: 3px;
background-color: #fff;
writing-mode:tb-rl;
-webkit-transform:rotate(90deg);
-moz-transform:rotate(90deg);
-o-transform: rotate(90deg);
-ms-transform:rotate(90deg);
transform: rotate(180deg);
white-space:nowrap;
bottom:0;
margin: 0 auto;
}
.image {
list-style-type: none;
padding: 0;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto auto auto 9%;
}
.image img {
width: 100%;
height: 100%;
}
&#13;
<body>
<div class="menuleft">
<ul>
<li class="text">
<a href="#">Eficácia</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Rapidez</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Impacto <br> na vida real</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Tecnologia <br> avançada</a>
</li>
<li class="whitebar">
</li>
<li class="text">
<a href="#">Segurança</a>
</li>
</ul>
</div>
<div class="image">
<img src="http://wallpaperfx.com/uploads/wallpapers/2016/04/14/18521/preview_vatna-glacier-icelend.jpg" />
</div>
</body>
&#13;