Asked by:
Steps without image

Question
-
User1126057398 posted
How can one create Steps without images?
Want to create arrows as shown : https://codepen.io/audreyr/pen/tvxAz
Reference : https://bootsnipp.com/snippets/4Knm
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="Content/bootstrap.min.css" rel="stylesheet" />
<script src="Scripts/bootstrap.min.js"></script>
<script src="Scripts/jquery-3.3.1.min.js"></script>
<style type="text/css">
body{ margin-top:20px; }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
color: #fff;
background-image:url("Images/blue1_step.png");
background-color: none;
background-color:#fff !important;
display: table;
width: 209px;
height: 45px;
background- 0;
background-repeat:no-repeat;
display:block;
}
.nav > li > a {
;
display: inline;
padding: 4px 21px;
}.nav > li > a:hover {
background-color:transparent;
}.nav > li > a:hover, .nav > li > a:focus {
background-color:transparent;
}.nav-justified > li > a {
text-align: left;
}
.list-group-item-heading {
margin-top: 0;
margin-bottom: 0;
}
.nav-justified > li {
display: table-cell;
width: -1% !important;
}.nav > li.disabled > a {
color: #333;
background-image:url("Images/grey1_step.png");
display: table;
width: 209px;
height: 45px;
background- 0;
background-repeat:no-repeat;
display:block;
}
.disabledcls{
background-image:url("Images/grey1_step.png");
display: table;
width: 209px;
height: 45px;
background- 0;
background-repeat:no-repeat;
display:block !important;
color:#333;
}a:hover, a:focus {
color: #333;
}</style>
<script type="text/javascript">
$(document).ready(function () {var navListItems = $('ul.setup-panel li a'),
allWells = $('.setup-content');allWells.hide();
navListItems.click(function (e) {
e.preventDefault();
var $target = $($(this).attr('href')),
$item = $(this).closest('li');if (!$item.hasClass('disabled')) {
$(this).addClass('disabledcls');
navListItems.closest('li').removeClass('active');
$item.addClass('active');
allWells.hide();
$target.show();
}
});$('ul.setup-panel li.active a').trigger('click');
// DEMO ONLY //
$('#activate-step-2').on('click', function (e) {
$('ul.setup-panel li:eq(1)').removeClass('disabled');
$('ul.setup-panel li:eq(0) a').addClass('disabledcls');
$('ul.setup-panel li a[href="#step-2"]').trigger('click');
$(this).remove();
})
$('#activate-step-3').on('click', function (e) {
$('ul.setup-panel li:eq(2)').removeClass('disabled');
$('ul.setup-panel li a[href="#step-3"]').trigger('click');
$(this).remove();
})
$('#activate-step-4').on('click', function (e) {
$('ul.setup-panel li:eq(3)').removeClass('disabled');
$('ul.setup-panel li a[href="#step-4"]').trigger('click');
$(this).remove();
})
$('#activate-step-5').on('click', function (e) {
$('ul.setup-panel li:eq(4)').removeClass('disabled');
$('ul.setup-panel li a[href="#step-5"]').trigger('click');
$(this).remove();
})
});
</script>
</head>
<body>
<form id="form1" runat="server"><!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row form-group">
<div class="col-xs-12">
<ul class="nav nav-pills nav-justified thumbnail setup-panel">
<li class="active"><a href="#step-1">
<%-- <img src="Images/blue1_step.png" />--%>
<h4 class="list-group-item-heading">Step 1</h4>
<p class="list-group-item-text">First step description</p>
</a></li>
<li class="disabled"><a href="#step-2">
<h4 class="list-group-item-heading">Step 2</h4>
<p class="list-group-item-text">Second step description</p>
</a></li>
<li class="disabled"><a href="#step-3">
<h4 class="list-group-item-heading">Step 3</h4>
<p class="list-group-item-text">Third step description</p>
</a></li>
<li class="disabled"><a href="#step-4">
<h4 class="list-group-item-heading">Step 4</h4>
<p class="list-group-item-text">Fourth step description</p>
</a></li>
<li class="disabled"><a href="#step-5">
<h4 class="list-group-item-heading">Step 5</h4>
<p class="list-group-item-text">Fifth step description</p>
</a></li>
</ul>
</div>
</div>
<div class="row setup-content" id="step-1">
<div class="col-xs-12">
<div class="col-md-12 well text-center">
<h1> STEP 1</h1>
<button id="activate-step-2" class="btn btn-primary btn-lg">Activate Step 2</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-2">
<div class="col-xs-12">
<div class="col-md-12 well">
<h1 class="text-center"> STEP 2</h1>
<button id="activate-step-3" class="btn btn-primary btn-lg">Activate Step 3</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-3">
<div class="col-xs-12">
<div class="col-md-12 well">
<h1 class="text-center"> STEP 3</h1>
<button id="activate-step-4" class="btn btn-primary btn-lg">Activate Step 4</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-4">
<div class="col-xs-12">
<div class="col-md-12 well">
<h1 class="text-center"> STEP 4</h1>
<button id="activate-step-5" class="btn btn-primary btn-lg">Activate Step 5</button>
</div>
</div>
</div>
<div class="row setup-content" id="step-5">
<div class="col-xs-12">
<div class="col-md-12 well">
<h1 class="text-center"> STEP 5</h1>
</div>
</div>
</div>
</div>
</form>
</body>
</html>Tuesday, April 23, 2019 10:42 AM
All replies
-
User288213138 posted
Hi geetasks,
I tried running your code and found that the problem was with CSS. This is the result of some of the CSS I've removed.
The Result:If you want to use Bootstrap on base of CSS, it is impossible to achieve the desired effect because Bootstrap breaks the CSS structure. But you can directly use Bootstrap, This is a reference link:
http://www.java2s.com/Tutorials/HTML_CSS/Bootstrap_Example/Button/Create_arrow_button.htm
Best Regard,
SamWednesday, April 24, 2019 10:54 AM