Is there a way to create "up and down" control buttons using only CSS and no background image?
I attempted to add CSS for arrows in "li.className:after
or li.className:before
", but it caused the main boxes to move.
Check out the Fiddle link to see the issue I am facing: http://jsfiddle.net/8usFk/
Here is the code:
HTML
<div class="positionCameras">
<ul>
<li title="Move Up" class="cameraLeft" id="cameraUp"></li>
<li title="Camera" class="cameraIcon"></li>
<li title="Move Down" class="cameraRight" id="cameraDown"></li>
</ul>
</div>
CSS
.positionCameras ul, .positionCameras li {
margin: 0;
padding: 0;
list-style: none;
display: inline-block;
}
.positionCameras li.cameraLeft, .positionCameras li.cameraIcon, .positionCameras li.cameraRight {
width: 25px;
height: 25px;
cursor: pointer;
background: #cccccc;
margin: 5px;
border-radius: 5px;
border: 1px solid #aaaaaa;
box-shadow: 1px 2px 15px #cccccc;
}
.positionCameras li.cameraLeft:before {
content:" ";
width: 0;
height: 0;
border-style: solid;
border-width: 0 5px 10px 5px;
border-color: transparent transparent #007bff transparent;
}
.positionCameras li.cameraIcon {
cursor: default;
}
.positionCameras li.cameraRight:before {
width: 0;
height: 0;
border-style: solid;
border-width: 8.7px 5px 0 5px;
border-color: #007bff transparent transparent transparent;
}
If you require more information, feel free to ask.
Please provide suggestions on how to resolve this issue.