I have implemented ngx-spinner in my angular 7 page and set the fullscreen to false as I don't want the header to be covered by the background color of the spinner. It still covers the whole page while rendering. Not sure what the problem is.
Following is the link that I referred to
https://napster2210.github.io/ngx-spinner/
.alert {
margin-top: 10px;
height: 500x;
position: relative;
width: 100%;
/* padding: 15px; */
bottom: 0%;
border: 1px solid transparent;
border-radius: 4px;
float: left;
}
.alert-danger {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
table {
border-collapse: collapse;
}
.spacing {
padding-top: 0.5em;
padding-bottom: 0.5em;
}
.k-tabstrip > .k-content.k-state-active {
display: none !important;
}
<div style="overflow-x: hidden; overflow-y: hidden;">
<ngx-spinner bdOpacity=0.9 bdColor="#fff" size="medium" color="grey" type="ball-spin" fullScreen="false">
<p style="color: white"> Loading... </p>
</ngx-spinner>
<div class="form-group row col-md-12" style="margin-top:30px">
<div class="col-md-1">
<label for="inputFax" class="col-form-label" style="font-weight: bold;">Eval Date</label>
<kendo-datepicker style="width: 100% ;float: left;" [format]="'MMMM yyyy'" [topView]="'decade'"
[bottomView]="'year'" [(ngModel)]="evalDate" (valueChange)="evalDateChanged($event)">
</kendo-datepicker>
</div>
<div class="col-md-2" style="padding-left: 10px; width: 100%"><a class="btn btn-primary "
(click)="downloadFundAllocationDetails()" [attr.href]="Url">Export To
EXCEL<i title="PDF" class="fa fa-file-excel-o"></i> </a></div>
</div>
<div class="form-group row">
<div class="panel panel-default col-md-12 ">
<div *ngIf="AllocationDetails && AllocationDetails.ManagerAllocations" class="panel-body">
<div id="grid-wrapper" [style.height.px]="GridHeight()" [style.width.%]="100" style="float: left;">
<span style="text-decoration: underline; cursor: pointer;padding-right: 10px;"><a (click)="expandAll()">Expand
All</a></span>
<span style="text-decoration: underline; cursor: pointer;"><a (click)="collapseAll()">Collapse
All</a></span>
<ag-grid-angular #agGrid class="ag-theme-balham" [gridOptions]="GridOptions" style="width: 100%; height: 100%"
[columnDefs]="ColumnDefs" [rowData]="AllocationDetails.ManagerAllocations" rowHeight="30" headerHeight="30"
rowSelection="single" [pinnedBottomRowData]="pinnedBottomRowData"
[frameworkComponents]="frameworkComponents">
</ag-grid-angular>
</div>
</div>
</div>
</div>
<div class="form-group row">
<div class="panel panel-default col-md-12">
<div style="height: 100%; width: 100%;" *ngIf="AllocationDetails && AllocationDetails.MissingProducts"
class="alert alert-danger col-md-5">
<p><strong>The investments made in the following products are not included in this report:</strong></p>
<table>
<ng-container *ngFor="let group of AllocationDetails.MissingProducts">
<tr>
<th> {{group[0].ProductType}}</th>
</tr>
<tr *ngFor="let post of group">
<td> {{ post.ProductName }} </td>
</tr>
<tr>
<td class="spacing"></td>
</tr>
</ng-container>
</table>
</div>
<div style="height: 100%; width: 100%; float:left;" *ngIf="AllocationDetails && AllocationDetails.ChartData"
class="col-md-7">
<app-pie-chart [series]="allocation_series"></app-pie-chart>
</div>
</div>
</div>
</div>
Wrap it in a div with relative position if you want it to fill the container it's in:
<div style="position: relative">
<ngx-spinner
bdOpacity = 0.9
bdColor = "#f4f4f9"
size = "medium"
color = "#1010ee"
type = "ball-clip-rotate"
[fullScreen] = "false">
</ngx-spinner>
</div>
In your case you forgot the square brackets.
You have to do it like this:
<ngx-spinner bdOpacity=0.9 bdColor="#fff" size="medium" color="grey" type="ball-spin" [fullScreen]="false">
<p style="color: white"> Loading... </p>
</ngx-spinner>
For show it only on layout container div add app-spinner tag after router-outlet :
<div class="col content">
<router-outlet #o="outlet"></router-outlet>
<div class="complement-box"></div>
<ngx-spinner bdColor="rgba(0,0,0,0.32)" size="large" color="#8652d5" type="ball-clip-rotate-multiple"
[fullScreen]="false">
</ngx-spinner>
</div>
For set border of spinner set this style in styles.scss file :
.overlay[_ngcontent-serverApp-c52] {
border-radius: 43px;
height: 106% !important;
margin-top: -1px;
}
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am designing a page to be loaded on phones and iPad. I am trying to figure out how to arrange the pic as follow. 3 columns and 2 rows in container-fluid. The pic and words must resize when switching between phones and iPad. I am only displaying in portrait mode. My current code, I only specify a static height and width for all the pics but how to do it dynamically? I am also using <table> to arrange the pic and wordings, is there a better way by using div. Please help, thanks you very much.
The ideal arrangement:
My results:
JS FIDDLE DEMO
<!-- Bootstrap core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<style>
* {
box-sizing: border-box;
font-family:Arial;
font-size:12px;
}
img {
width: 100%;
}
div#form-box {
margin-top: -95px;
text-align: center;
}
div#input-group {
width: 90%;
margin: 15px auto 5px; /* top, left and right, bottom */
position: relative;
background-color: #fff;
border: none;
border-radius: 5px;
}
input#searchClasses, label[for="searchClasses"] {
display:inline-block;
vertical-align: middle;
}
input#searchClasses {
width: calc(100% - 40px);
padding: 10px;
border: none;
}
label[for="searchClasses"] {
width: 40px;
line-height: 30px;
}
button#btn-checkin {
display: inline-block;
padding: 8px 20px;
border: none;
border-radius: 5px;
background-color: #EC008c;
color: #fff;
text-align: center;
text-transform: uppercase;
}
.drop-shadow {
-webkit-box-shadow: 0 0 2px 2px rgba(0, 0, 0, .5);
box-shadow: 0 0 10px 1px rgb(211, 211, 211, 0.8);
border-radius:0px;
}
.container-fluid{
width:auto
}
.container-fluid.drop-shadow {
margin-top:2%;
margin-left:5%;
margin-right:5%
}
#content{
width:100%;
margin: auto;
text-align: center;
margin-top: 8px;
}
.form-group {
width:100%;
margin-bottom:10px;
}
.btn-plan {
display: inline-block;
height:48px;
padding: 8px 10px;
margin-bottom: 10px;
border: none;
border-radius: 10px;
background-color: #B9E5FB;
color: #000;
text-align: center;
width:95%
}
.btn-popular {
display: inline-block;
height:48px;
padding: 0px 0px;
white-space: normal;
margin-bottom: 10px;
border: none;
border-radius: 10px;
background-color: #B9E5FB;
color: #000;
text-align: center;
width:95%
}
.textUnderPic{
margin-top:2px;
text-align:center;
font-size:8px;
}
</style>
</head>
<body id="sfitness" >
<img src="https://preview.ibb.co/kJvJ5e/1847p.png" />
<div id="form-box">
<form>
<div id="input-group">
<label for="searchClasses" class="glyphicon glyphicon-search"></label><!--
--><input type="text" placeholder="Search Classes" id="searchClasses" readonly>
</div>
<br/>
<button id="btn-checkin">Check-in</button>
</form>
</div>
<div id="content">
<div class="container-fluid">
<table style="width:100%;margin-left:4%">
<tr>
<td>
<img src="https://image.ibb.co/jWX2Jz/location.png" alt="location" border="0" class="float-left" style="width:17px;height:20px"/>
</td>
<td style="padding-left:9px;padding-top:9px;width:auto;text-align:left">
<p>Current Location <b>Sri Petaling</b></p>
</td>
</tr>
</table>
</div>
<div class="container-fluid drop-shadow">
<div class="media">
<div class="media-left">
<a href="#">
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 5px">
</a>
</div>
<div class="media-body">
<h5 class="media-left" style="padding-top:12px;color:#B9E5fB" >PERSONAL TRAINING</h5>
<p class="pull-left" style="padding-top:3px">Strike Academy Fitness</p>
</div>
</div>
</div>
<div class="container-fluid drop-shadow" style="overflow:auto;padding:0px;margin-top:20px">
<table style="width:93%;margin:3%">
<tr>
<td colspan="3">
<p style ="padding-left:5px;padding-top:3px; width:100%;text-align:left">Plan your time</p>
</td>
</tr>
<tr>
<td style="width:33.33%">
<button class="btn-plan" >All</button>
</td>
<td style="width:33.33%">
<button class="btn-plan" >Morning</button>
</td>
<td style="width:33.33%">
<button class="btn-plan">Afternoon</button>
</td>
</tr>
<tr>
<td>
<button class="btn-plan">Evening</button>
</td>
<td>
<button class="btn-plan">Tomorrow</button>
</td>
<td>
<button class="btn-plan">This Week</button>
</td>
</tr>
</table>
</div>
<div class="container-fluid drop-shadow" style="overflow:auto;padding:0px;margin-top:20px">
<table style="width:93%;margin:3%">
<tr>
<td colspan="3">
<p style ="padding-left:5px;padding-top:3px; width:100%;text-align:left">Nearby Class starts in next 60 mins</p>
</td>
</tr>
<tr>
<td style="width:33%;align-self:center">
<div style="width:50%">
<img class="media-object" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
</div>
</td>
<td width="33%">
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 0px 5px" alt="Generic placeholder image">
</td>
<td width="33%">
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 0px 5px" alt="Generic placeholder image">
</td>
</tr>
<tr>
<td>
<p class="textUnderPic"><font color="#00B3F0">Gym</font>Sungai Besi</p>
</td>
<td>
<p class="textUnderPic"><font color="#00B3F0">Muay Thai</font>Sri Pinang</p>
</td>
<td>
<p class="textUnderPic"><font color="#00B3F0">Yoga</font>Serdang</p>
</td>
</tr>
<tr>
<td>
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 0px 5px" alt="Generic placeholder image">
</td>
<td>
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 0px 5px" alt="Generic placeholder image">
</td>
<td>
<img class="media-object" src="https://preview.ibb.co/nnzPyz/7557.jpg" style="width:104px;height:64px;padding:10px 10px 0px 5px" alt="Generic placeholder image">
</td>
</tr>
<tr>
<td>
<p class="textUnderPic" >Gym</font>Sungai Besi</p>
</td>
<td>
<p class="textUnderPic" >Muay Thai</font>Sri Pinang</p>
</td>
<td>
<p class="textUnderPic" >Yoga</font>Serdang</p>
</td>
</tr>
</table>
</div>
</div>
I have updated the fiddle for you. "https://jsfiddle.net/87qughpe/10/"
Some Notes:
Don't know which bootstrap you were using, I have used Bootstrap-4
Don't use table to write that structure, but rather use Boostrap Grid
Let the image expand as per width of container.
.worked-div p {
text-align: left;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css" rel="stylesheet" />
<div class="container-fluid drop-shadow worked-div" style="">
<div class="row">
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
<div class="row">
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
<div class="col-4">
<img class="img-fluid" align="center" src="https://preview.ibb.co/nnzPyz/7557.jpg" alt="Generic placeholder image">
<p>
Generic placeholder image
</p>
</div>
</div>
I'm having trouble trying to implement the styling shown in this image using CSS. My problem is how to make the horizontal yellow line over the title "nossos numeros" and the vertical blue lines between "Cursos", "Alunos" and "Aulas".
I'm using also Bootstrap 4.
I want this:
I did this:
<section class="bg-light" id="portfolio" style="background-color: #ffffff;">
<div class="container-fluid">
<div class="row text-center">
<div class="col-sm-3">
<p class="font-square2" style="border-top: 5px yellow solid;">
NOSSOS <br> NÚMEROS</p>
</div>
<div class="col-sm-3" style="padding-top: 50px; border-right: 1px blue solid; ">
<img class="img-fluid" src="img/icone_cursos.png">
<div class="portfolio-caption">
<p class="font-square"> 1123 </p>
<p class="font-square"><strong>Cursos</strong></p>
</div>
</div>
<div class="col-sm-3" style="padding-top: 50px; border-right: 1px blue solid;">
<img class="img-fluid" src="img/icone_alunos.png">
<div class="portfolio-caption">
<p class="font-square"> 34534 </p>
<p class="font-square"><strong>Alunos</strong></p>
</div>
</div>
<div class="col-sm-3" style="padding-top: 65px;">
<img class="img-fluid" src="img/icone_aulas.png">
<div class="portfolio-caption">
<p class="font-square"> 4566 </p>
<p class="font-square"><strong>Aulas</strong></p>
</div>
</div>
</div>
</div>
</section>
but now how I can set the size of the border that I want with a color ?
Thanks in advance!
In this way you can't. You have to use preudoelements. Example:
div {
width : 200px;
height : 50px;
}
div:before {
content : "";
position: absolute;
left : 0;
bottom : 0;
height : 1px;
width : 50%;
border-bottom:1px solid yellow;
}
<div>Item 1</div>
<div>Item 2</div>
You can use pseudo elements for this
Try this
#fortopborder:before {
height: 10px;
display: block;
width: 100px;
background: red;
content: '';
}
#forrightborder:after {
display: block;
content: '';
background: blue;
Width: 10px;
height: 100px;
margin-top: -120px;
Float:right;
}
I have a page using a masterpage in asp.net 4.0. My masterpage has header which has a search box. Header has css position fixed and have z-index 10.
I am trying to create a search instruction which will open when user types anything. my instruction box do not show as floatig over header instead it opens inside header and expands it. Here are my css and html
header {
width:100%;
display:inline-block;
background-color:#ef4023;
position:fixed;
z-index:10;
}
header #Guide {
width: 100%;
z-index: 5;
margin-right: -1px;
position:relative;
background: #eee;
border: 1px solid #ccc;
}
<header>
<div class="col-lg-4 col-md-4 col-sm-2 col-xs-4">
<div class="logo">
<img src="images/logo.png" alt="logo" class="img-responsive" />
</div>
</div>
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-8">
<div class="col-md-6">
<!--SearchBarStart-->
<div ng-controller="MyCtrl">
<form>
<h3>Search Here </h3>
<input type="text" class="form-control" id="SearchKeyword" ng-model="searchText" required="required" />
<div class="list-group" id="Guide" ng-show="showLinks">
<a class="list-group-item" href="" ng-click="SearchType(0,true,'KeyWord', 1)">
<div class="input-group">
<span class="fa fa-suitcase"></span><span style="padding-left: 20px">instruction goes here</span>
</div>
</a>
</div>
</form>
</div>
</div>
</div>
</header>
You have to use position: fixed also on the instruction box, with according position settings. (relative will put it into the document flow, thereby taking up space, and absolute won't work since you don't have a relative parent for it.)
header {
width: 100%;
display: inline-block;
background-color: #ef4023;
position: fixed;
z-index: 10;
}
header #Guide {
width: 100%;
z-index: 15;
margin-right: -1px;
position: fixed;
top: 110px;
left: 0px;
background: #eee;
border: 1px solid #ccc;
}
<header>
<div class="col-lg-4 col-md-4 col-sm-2 col-xs-4">
<div class="logo">
<img src="images/logo.png" alt="logo" class="img-responsive" />
</div>
</div>
<div class="col-lg-8 col-md-8 col-sm-10 col-xs-8">
<div class="col-md-6">
<!--SearchBarStart-->
<div ng-controller="MyCtrl">
<form>
<h3>Search Here </h3>
<input type="text" class="form-control" id="SearchKeyword" ng-model="searchText" required="required" />
<div class="list-group" id="Guide" ng-show="showLinks">
<a class="list-group-item" href="" ng-click="SearchType(0,true,'KeyWord', 1)">
<div class="input-group">
<span class="fa fa-suitcase"></span><span style="padding-left: 20px">instruction goes here</span>
</div>
</a>
</div>
</form>
</div>
</div>
</div>
</header>`
I've tried to incorporate my own style to the nav-tabs in bootstrap 4 because the out-of-the-box does fit my theme very well.
I've got it looking how I want it to, but when I hover over a tab, the border-bottom on the nav-tabs section moves down about 1px. I've tried manipulating the margin, padding, etc but can't seem to figure out how to get it to stop doing it.
Can someone help here?
<div class="container-fluid body-content">
<div class="row">
<div class="col-xs-12 col-sm-3 col-lg-2">
<div class="row m-b-2">
<div class="col-xs-12">
<div class="row m-b-2 left-nav-container">
<div class="col-xs-12">
<div class="row left-nav"><a class="col-xs-6 col-sm-12 left-nav-menu-item" href="#">Update Starters</a>
<a class="col-xs-6 col-sm-12 left-nav-menu-item hidden-xs" href="/rankings/all">Wrestler Rankings</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-9 col-lg-10">
<div class="row">
<div class="col-xs-12">
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li class="nav-item">
<a class="nav-link active" data-toggle="tab" href="#roster" role="tab">Roster</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#schedule" role="tab">Schedule</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#elig" role="tab">Eligibility Breakdown</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#depth" role="tab">Depth Chart</a>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="tab" href="#info" role="tab">Team Info</a>
</li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div class="tab-pane fade in active" id="roster" role="tabpanel">
<div class="card">
<div class="card-heading">
<h2>Roster</h2>
</div>
<div class="table-responsive">
<table class="table table-sm table-hover">
<thead>
<tr>
<th>Weight</th>
<th>Name</th>
<th>Class</th>
<th>Record</th>
<th>Starter</th>
</tr>
</thead>
<tbody>
<tr style="background-color: lightgray;">
<td>125</td>
<td>#4 Dance, Joey</td>
<td>JR</td>
<td>29 - 3</td>
<td>
<input checked="checked" data-val="true" data-val-required="The Starter field is required." disabled="disabled" id="Wrestlers_0__Starter" name="Wrestlers[0].Starter" style="font-size: large; margin-left: 10px; margin-top: 5px;"
type="checkbox" value="true" />
<input name="Wrestlers[0].Starter" type="hidden" value="false" />
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="schedule" role="tabpanel">
<div class="card">
<div class="card-heading">
<h2>Schedule</h2>
</div>
<div class="table-responsive">
<table class="table table-sm table-hover">
<thead>
<tr>
<th>Date</th>
<th>Name</th>
<th>Type</th>
<th>Opponent</th>
<th>Comparison</th>
<th>Win</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>11/07/15</td>
<td>Iowa State - Virginia Tech Dual</td>
<td>Dual</td>
<td>
#19 Iowa State
</td>
<td>
Dual Comparison
</td>
<td>W</td>
<td>
32 - 3
</td>
</tr>
<tr>
<td>11/08/15</td>
<td>
Hokie Open
</td>
<td>Tournament</td>
<td>Hokie Open</td>
<td>(NA)</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="elig" role="tabpanel">
<div class="card">
<div class="card-heading">
<h2>Eligibility Breakdown</h2>
</div>
<div class="table-responsive">
<table class="table table-sm table-hover table-striped table-bordered">
<thead>
<tr>
<th class="text-xs-center elig-header-border">Weight</th>
<th class="text-xs-center elig-header-border">Recruit</th>
<th class="text-xs-center elig-header-border">True Freshman</th>
<th class="text-xs-center elig-header-border">Redshirt Freshman</th>
<th class="text-xs-center elig-header-border">Sophomore</th>
<th class="text-xs-center elig-header-border">Junior</th>
<th class="text-xs-center elig-header-border">Senior</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-xs-center elig-header-border">125</td>
<td class="text-xs-center elig-cell">
<p>Joey Prata</p>
</td>
<td class="text-xs-center elig-cell">
<p>#70 Ryan Haskett</p>
</td>
<td class="text-xs-center elig-cell">
<p></p>
</td>
<td class="text-xs-center elig-cell">
<p></p>
</td>
<td class="text-xs-center elig-cell">
<p>#4 Joey Dance</p>
</td>
<td class="text-xs-center elig-cell">
<p></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="tab-pane fade" id="depth" role="tabpanel">
<div class="row">
<div class="col-xs-12">
<div class="card">
<div class="card-heading">
<h2>Depth Chart</h2>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-4 col-xl-3">
<div class="card">
<div class="card-heading">
<h3 class="text-xs-center">125</h3>
</div>
<div class="table-responsive">
<table class="table table-sm table-hover">
<thead>
<tr>
<th>Name</th>
<th>Class</th>
<th>Record</th>
</tr>
</thead>
<tbody>
<tr>
<td>#4 Dance Joey</td>
<td>JR</td>
<td class="text-xs-right">29 - 3</td>
</tr>
<tr>
<td>#70 Haskett Ryan</td>
<td>FR</td>
<td class="text-xs-right">4 - 5</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane fade" id="info" role="tabpanel">
<div class="card">
<div class="card-heading">
<h2>Team Information</h2>
</div>
<div class="card-block">
<form class="form-horizontal" role="form" method="POST" action="Edit">
<input data-val="true" data-val-required="The SchoolId field is required." id="SchoolInfo_SchoolId" name="SchoolInfo.SchoolId" type="hidden" value="74" />
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_SchoolName">SchoolName</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_SchoolName" name="SchoolInfo.SchoolName" readonly="readonly" type="text" value="Virginia Tech" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_Aka">Aka</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_Aka" name="SchoolInfo.Aka" placeholder="(ie North Dakota State University is NDSU)" type="text" value="" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_Nickname">Nickname</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_Nickname" name="SchoolInfo.Nickname" type="text" value="Hokies" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_Division">Division</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_Division" name="SchoolInfo.Division" readonly="readonly" type="text" value="Division I" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_Conference">Conference</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_Conference" name="SchoolInfo.Conference" readonly="readonly" type="text" value="ACC" />
</div>
</div>
<div class="row form-group">
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2">
<label class="form-control-label" for="SchoolInfo_TwitterHandle">TwitterHandle</label>
</div>
<div class="col-xs-6 col-sm-8 col-md-4">
<input class="form-control" id="SchoolInfo_TwitterHandle" name="SchoolInfo.TwitterHandle" readonly="readonly" type="text" value="#VT_Wrestling" />
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="validation-summary-valid" data-valmsg-summary="true">
<ul>
<li style="display:none"></li>
</ul>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer class="hidden-xs-down">
<nav class="navbar navbar-fixed-bottom navbar-dark bg-inverse p-t-1 text-xs-center">
<h6>© 2016 - WrestleStat - ACS, LLC</h6>
</nav>
</footer>
</div>
CSS
body {
padding-top: 70px;
padding-bottom: 20px;
margin-bottom: 60px;
}
/* Wrapping element */
/* Set some basic padding to keep content from hitting the edges */
.body-content {
padding-left: 15px;
padding-right: 15px;
}
/* Set widths on the form inputs since otherwise they're 100% wide */
input,
select,
textarea {
max-width: 280px;
}
a {
color: black;
text-decoration: underline;
}
a:hover {
color: red;
}
/* Carousel */
.carousel-caption {
z-index: 10 !important;
}
.carousel-caption p {
font-size: 20px;
line-height: 1.4;
}
#media (min-width: 768px) {
.carousel-caption {
z-index: 10 !important;
}
}
.footer {
position: absolute;
/*bottom: 0;*/
width: 99%;
height: 60px;
line-height: 60px;
background-color: black;
/* #f5f5f5; */
}
.widget {
font-size: .85rem;
padding: .75rem .75rem;
}
.widget-header {
padding: 1rem .75rem .5rem .75rem;
}
.borderless td,
.borderless th {
border: none;
}
.no-underline {
text-decoration: none;
}
/*.card-block-border-bottom {
border-bottom: 1px solid #e5e5e5;
}*/
/* Left Nav stuff */
.left-nav-menu-item {
color: #eceeef;
text-decoration: none;
border-top: .1rem solid white;
background-color: #373a3c;
}
.left-nav {
line-height: 3rem;
}
.left-nav > div:first-of-type {
margin-top: .2rem;
}
a.left-nav-menu-item:hover {
cursor: pointer;
}
a.left-nav-menu-item:hover {
color: red;
text-decoration: none;
}
/* End of left nav */
/* Top nav overrides since Bootstrap 4 isn't complete */
.navbar-brand {
float: none;
margin-top: 1px;
}
.navbar-nav .nav-item {
float: none;
}
.navbar-divider,
.navbar-nav .nav-item + .nav-item,
.navbar-nav .nav-link + .nav-link {
margin-left: 0;
}
#media (min-width: 34em) {
.navbar-brand {
float: left;
}
.navbar-nav .nav-item {
float: left;
}
.navbar-divider,
.navbar-nav .nav-item + .nav-item,
.navbar-nav .nav-link + .nav-link {
margin-left: 1rem;
}
}
.nav.navbar-nav {
padding-top: .3rem;
}
.navbar .navbar-nav .nav-item .nav-link {
text-decoration: none;
}
.navbar .navbar-nav .nav-item .nav-link:hover {
cursor: pointer;
}
.navbar .navbar-nav .nav-item .nav-link.donate {
font-weight: bolder;
color: green;
}
.navbar .navbar-nav .nav-item .nav-link.donate:hover {
color: white;
}
.navbar .navbar-nav .nav-item .dropdown-item {
background-color: #373a3c;
text-decoration: none;
color: #eceeef;
}
.navbar .navbar-nav .nav-item .dropdown-item:hover {
color: #eceeef;
}
/* End of top nav overrides */
/* tab overrides */
.nav.nav-tabs .nav-item a {
text-decoration: none;
}
.nav.nav-tabs a.active {
border: 1px solid black;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-color: #373a3c;
border-bottom: none;
color: white;
font-weight: bold;
}
.nav.nav-tabs li.nav-item:hover {
border: 1px solid #373a3c;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom: none;
margin-bottom: 0;
padding-bottom: none;
}
.nav.nav-tabs li.nav-item:hover a {
color: black;
}
ul.nav.nav-tabs {
border-bottom: 2px solid #373a3c;
margin-bottom: 1rem;
}
ul.nav.nav-tabs div.tab-content div.card {
border: none;
}
/* end of tab overrides*/
/* eligibility breakdown page */
.elig-header-border {
background-color: lightgray;
}
.elig-border {
border: .1rem solid black;
}
td.elig-cell:hover {
background-color: red;
}
td.elig-cell:hover a:hover {
color: white;
}
/* end of eligibility breakdown */
jsfiddle
How to debug hover states
In order to see what happens when hovering an element, I recommend you to use the "force element state" functionality :hover of Chrome Dev Tools:
Doing that, I can play editing and checking/uncheking stuff to find a solution, then elaborate a CSS correction.
Solution
There's no doubt you have a problem with nested borders. You can use the previous technique to find a cleaner solution, but here is a fast fix:
.nav.nav-tabs li.nav-item {
border: 1px solid transparent;
margin-bottom: -2px !important;
}
.nav.nav-tabs li.nav-item:hover {
border: 1px solid #373a3c !important;
border-bottom: 1px solid transparent !important;
}
.nav.nav-tabs li.nav-item a.nav-link:hover {
border: 1px solid transparent;
border-bottom: none;
}
JSFiddle
Edit
Considering the :focus event, which is triggered when the element gets clicked, you may want to override the default Bootstrap styles for it too.
Add the focus selector .nav.nav-tabs a.active:focus to these styles, so they apply when focusing the element too:
.nav.nav-tabs a.active, .nav.nav-tabs a.active:focus {
border: 1px solid black;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
background-color: #373a3c;
border-bottom: none;
color: white;
font-weight: bold;
}
Next to it, you'll want to override the background to keep it white when hovering, even when the element is also focused, so add this:
.nav.nav-tabs a.active:hover {
background-color: #fff;
}
JSFiddle
Here is another solution if you don’t want to add a transparent border but just using padding
Change your the entry .nav.nav-tabs li.nav-item:hover to:
.nav.nav-tabs li.nav-item:hover {
border: 1px solid #373a3c;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom: none;
padding: 0px 0px 0px 0px;
}
and add:
.nav.nav-tabs li.nav-item{
padding: 1px 1px 0px 1px;
}
It should work as expected. JsFiddle
I have a couple of different issues.
I have a div with a couple of other divs and some controls in it. My biggest issue is that it does not look the same in Chrome as it does in other browsers. As it is right now, it looks as following:
And the biggest issue is with Chrome, where the textbox to the right of the "width:" text goes down onto the next line. The code for the box can be seen in this JSFiddle or as as following:
<div id="div_properties" class="redBorder left" style="clear: left; display:
<div class="right">
<a href="#" id="closePropertiesWindow">
<img src="close.png" title="Close window"></a>
</div>
<div class="centered noMargin whiteBackground">
<h3 class="noMargin">Properties</h3>
</div>
<hr class="noMargin noPadding">
<div id="div_properties_content" style="display: block;">
<div class="noMargin propertiesControl" prop="text" style="width:100%;">
text:
<input type="text" id="propertytextTextBox" class="right"></input>
</div>
<div class="noMargin propertiesControl" prop="width" style="width:100%;">
width:
<input type="number" id="propertywidthNumber" class="right"></input>
</div>
<div class="noMargin propertiesControl" prop="italic" style="width:100%;">
italic:
<input type="checkbox" id="propertyitalicCheckBox" class="right" checked="checked">
</div>
<div class="noMargin propertiesControl" prop="bold" style="width:100%;">
bold:
<input type="checkbox" id="propertyboldCheckBox" class="right">
</div>
<br>
<input type="button" id="savePropertiesButton" value="Save" class="right">
</div>
</div>
And the CSS is as following:
#div_properties {
margin-top: 5px;
background-color: #F0F0F0;
width: 300px;
float: left;
min-height: 75px;
}
.redBorder {
border: 1px solid red;
}
.noMargin {
margin: 0 0 0 0;
}
.left {
float: left;
}
.right {
float: right;
}
(Those are all the related classes in this scope, the other classes defined on the items have no styles, but are being used in the JavaScript.)
Also, another issue I'm having is the "box border" around the close-image in IE. This is not a big issue, but if anyone knows what is causing it, it would be fantastic.
Its the floating that's causing the issue. You need to clear them.
.propertiesControl {
clear:both;
}
http://jsfiddle.net/JWDkM/2/