I have some padding and margin "errors" in firefox that I haven't figured out yet.
This is the test page where the screw-ups are happening.
This is the code for the HTML/CSS for the black caption box:
#caption{
position:relative;
display:block;
margin: -4px 0 0 0;
width: 650px;
height:68px;
background-color: black;
}
<div>
<div id="slider2">
<div>
<img src="img/urban.jpg" />
</div>
<div>
<img src="img/urban2.jpg" />
</div>
<div>
<img src="img/urban3.jpg" />
</div>
</div>
<div id="caption"></div>
</div>
This is the schedule code too:
#schedule{
height: 500px;
background-color: #ededed;
padding: 10px 10px 0px 10px;
}
#schedule h2{
text-align: center;
font-family: Arial;
color: rgba(0,0,0,.7);
}
.away{
color: red;
}
.gameline{
border-bottom: 1px solid rgba(0,0,0,.4);
}
.lineup > li{
margin: 0 0 7px 0;
}
#date{
margin: 20px 0 0 0;
list-style:none;
width: 70px;
float:left;
padding-right:30px;
font-family: 'Esteban', serif;
font-family: Arial;
font-weight: bold;
}
#date > .gameline{
border-bottom: 1px dashed rgba(0,0,0,0);
}
#opponent{
margin: 20px 0 0 0;
font-family: 'Esteban', serif;
font-family: Arial;
list-style:none;
}
<div id="right">
<div id="schedule">
<h2>2012 Schedule</h2>
<ul id="date" class="lineup">
<li>APR. 21</li>
<li class="gameline"></li>
<li>SEPT. 1</li>
<li class="gameline"></li>
<li>SEPT. 8</li>
<li class="gameline"></li>
<li>SEPT. 15</li>
<li class="gameline"></li>
<li>SEPT. 22</li>
<li class="gameline"></li>
<li class="away">SEPT. 29</li>
<li class="gameline"></li>
<li>OCT. 6</li>
<li class="gameline"></li>
<li class="away">OCT. 13</li>
<li class="gameline"></li>
<li>OCT. 20</li>
<li class="gameline"></li>
<li class="away">OCT. 27</li>
<li class="gameline"></li>
<li>NOV. 3</li>
<li class="gameline"></li>
<li>NOV. 10</li>
<li class="gameline"></li>
<li class="away">NOV. 17</li>
<li class="gameline"></li>
<li>NOV. 24</li>
</ul>
<ul id="opponent" class="lineup">
<li>Scarlet & Gray Game</li>
<li class="gameline"></li>
<li>Miami(Ohio)</li>
<li class="gameline"></li>
<li>Central Florida</li>
<li class="gameline"></li>
<li>California</li>
<li class="gameline"></li>
<li>UAB</li>
<li class="gameline"></li>
<li class="away">Michigan State</li>
<li class="gameline"></li>
<li>Nebraska</li>
<li class="gameline"></li>
<li class="away">Indiana</li>
<li class="gameline"></li>
<li>Purdue</li>
<li class="gameline"></li>
<li class="away">Penn State</li>
<li class="gameline"></li>
<li>Illinois</li>
<li class="gameline"></li>
<li>BYE</li>
<li class="gameline"></li>
<li class="away">Wisconsin</li>
<li class="gameline"></li>
<li>Michigan</li>
</ul>
</div>
Use a inside your LI (for the date) and style the label instead of trying to put two LIs side-by-side and getting them to match. Set a width and float:left for the label.
Related
Hello and thanks in advance for the help. Here's a link to the site in question: caulfield.co/test/originals.html
I'm attempting to create a responsive navbar in which the current dropdown-items appear as the standard nav-items after collapse.
See this image:
The dropdown-items are displaying as intended on desktop. On mobile, however, the separate dropdown is unnecessary. Here is how it displays with Bootstrap 4 out of the box:
Does anyone know of a convenient or custom solution to remove the dropdown once the navbar-collapse is in use on mobile etc such that the dropdown-items appear just like the navbar-items? Ideally, the "More" nav-link would display:none and the nav-items would continue from "Contact" to "Works On Display" seamlessly.
HTML:
<nav id="navHome" class="navbar navbar-expand-lg navbar-light sticky-top">
<div class="container-fluid max-width-940">
<a class="navbar-brand" href="index.html">
<img src="images/mb.svg" alt="Margaret Biggs" width="220px"/>
</a>
<button class="navbar-toggler togglerNoBorder" type="button" data-toggle="collapse" data-target="#navbarNavDropdown" aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse backgroundWhite" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
<li class="nav-item active">
<a class="nav-link" href="bio.html">Bio <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item">
<a class="nav-link" href="originals.html">Originals</a>
</li>
<li class="nav-item">
<a class="nav-link" href="exhibition.html">Exhibition</a>
</li>
<li class="nav-item">
<a class="nav-link" href="prints.html">Prints</a>
</li>
<li class="nav-item">
<a class="nav-link" href="professionals.html">For Professionals</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.html">Contact</a>
</li>
<li class="nav-item dropdown navDropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
More
</a>
<div class="dropdown-menu navDropdown" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="works-on-display.html">Works on Display</a>
<a class="dropdown-item" href="poetry.html">Poetry</a>
<a class="dropdown-item" href="commissions.html">Commissions</a>
<a class="dropdown-item" href="blog.html">Blog</a>
</div>
</li>
</ul>
</div>
</div>
</nav>
CSS:
.navbar-right {
float:right;
}
.togglerNoBorder{
border: 0px solid transparent;
}
.nav940{
max-width:940px;
margin:0 auto;
}
#navHome {
color:rgb(34, 34, 34);
font-size:13px;
font-weight:400;
line-height:16px;
text-transform:uppercase;
background-color:white;
height:60px;
box-shadow: 0 0 18px -4px #000;
}
#navHome a{
color:rgb(34, 34, 34);
}
#navHome a:hover{
color:#165fa5;
}
.navDropdown {
font-size:13px;
}
.navDropdown a:hover {
background-color:white;
}
.backgroundWhite{
background-color:white;
}
.nav-item{
padding-left:10px;
}
.dropdown-item {
padding-top:10px;
}
.navbar-brand {
margin-bottom:3px;
}
.dropdown-menu {
top:45px;
}
Use a #media query for mobile (<992px) to show the dropdown-menu as normal nav-links...
#media (max-width: 992px) {
.dropdown-toggle {
display: none;
}
.dropdown-menu {
display: block;
position: relative;
border-width: 0;
padding: 0;
margin: 0;
}
.dropdown-item {
padding: .5rem 0rem;
color: rgba(0,0,0,.5);
}
}
https://www.codeply.com/go/lAAQOwhAx0
Based on the excellent answer by #Zim, I modified the style a bit to fit one by side in a dark navbar. Tested with Bootstrap 5, but I guess it should work in Bootstrap 4 as well.
#media (max-width: 992px) {
.dropdown-toggle {
display: none;
}
.dropdown-menu {
position: relative;
display: contents;
border-width: 0;
padding: 0;
margin: 0;
color: transparent;
}
.dropdown-item {
color: white;
background-color: black;
display: inline;
}
}
I have an Issue with the Bootstrap Carousel.
I want to have the fixed effect but in Firefox it's giving jumps.
HTML
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<div class="carousel-item-content" style="background:url('http://www.kia.ca/content/2018-soul/gallery/gallery-img-3.jpg')">
</div>
</div>
<div class="carousel-item">
<div class="carousel-item-content" style="background:url('http://carimages.silovendes.com/imgAutos/11/1056445-0.jpg')">
</div>
</div>
<div class="carousel-item">
<div class="carousel-item-content" style="background:url('https://kia.com.gt/images/modelos/rio/img/exterior-old//thumb/5.jpg')">
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
CSS
.carousel-item {
width: 100%;
height: 100vh;
}
.carousel-item .carousel-item-content {
width: 100%;
height: 100%;
-webkit-background-size: cover !important;
-moz-background-size: cover !important;
-o-background-size: cover !important;
background-size: cover !important;
background-position: center center !important;
background-repeat: no-repeat !important;
overflow: hidden !important;
background-attachment: fixed !important;
}
You can try it hier:
https://codepen.io/TamZam/pen/ZvQvox
Any ideas why it happens?
Thanks!
Hi to everyone I have a strange problem with Firefox 46, before the update my website work good, now if I go over the slider on top page it doesn't show me the custom cursor and if I click on it doesn't work the jquery function too.
On chrome, safari and also on the old version of FF it work; it's seems it can't see the div #banner because it's a child of others div containers, but why on the old version it work?
I'm confused
here's the test page
HTML code
<div class="parallax">
<header>
<div id="cont_logo">
<a class="logo" href="" rel="home"></a>
<span>L'étoile</span>
<span id="logo_text">Ristorante - Pizzeria - Steak House</span>
<span>Courmayeur</span>
</div>
<nav id="menu_lang">
<ul>
<li class="selected"><a href="" title="ita" >It</a></li>
<li><a href="" title="fra" >Fr</a></li>
<li><a href="" title="eng" >En</a></li>
</ul>
</nav>
<nav id="main_menu">
<ul>
<li>Home</li>
<li class="selected">Ristorante</li>
<li>Menu</li>
<li>Courmayeur</li>
<li>News</li>
<li>Gallery</li>
</ul>
</nav>
</header>
<div class="parallax__group">
<div class="parallax__layer parallax__layer--base">
<div id="banner">
<ul>
<li><img src="images/banner1.jpg" alt="" /></li>
<li><img src="images/banner2.jpg" alt="" /></li>
<li><img src="images/banner3.jpg" alt="" /></li>
<li><img src="images/banner4.jpg" alt="" /></li>
</ul>
</div>
</div>
<div id="overlayer">
<h2>Ristorante</h2>
</div>
</div>
CSS code
#banner{
width:100%;
overflow:hidden;
z-index:0;
position:relative;
top:0;
left:-4px;
}
#banner:not(.home):hover{cursor:url("img/zoom.cur"), auto;}
.parallax {
height: 100%;
overflow-x: hidden;
overflow-y: auto;
perspective: 1px;
width: 100%;
}
.parallax__layer--base {
bottom: 0;
left: 0;
position: relative;
right: 0;
top: 0;
transform: translateZ(-1px) scale(2);
}
.parallax__layer--back {
transform: translateZ(0px);
}
.parallax__layer--content {
position: relative;
}
.parallax__group {
position: relative;
height: 100vh;
transform-style: preserve-3d;
}
JQuery code
function zoom_banner(){
$( "#banner" ).click(function() {
$("#testa_pag, #overlayer").toggleClass('open');
});
}
Is it possible to create navigation bar with image icon at page bottom by using twitter bootstrap, here is sample image of the icon bar,
Here is an example for you :
<div class="nav-bottom">
<ul class="container nav nav-pills">
<li class="col-xs-4 col-sm-2 active">
<a href="#">
<i class="glyphicon glyphicon-comment"></i><br>
Message Board
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-home"></i><br>
Rooms
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-shopping-cart"></i><br>
Shopping List
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-wrench"></i><br>
Home Helpers
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-cog"></i><br>
Settings
</a>
</li>
<li class="col-xs-4 col-sm-2">
<a href="#">
<i class="glyphicon glyphicon-user"></i><br>
User
</a>
</li>
</ul>
</div>
.nav-bottom {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background: black;
padding: 5px 0;
}
.nav-bottom li + li {
margin-left: 0px;
}
.nav-bottom li a {
text-align: center;
background: black;
color: #ecf0f1;
}
.nav-bottom li:hover a,
.nav-bottom li:focus a {
background: #2980b9;
color: #ecf0f1;
}
.nav-bottom li.active a {
background: black;
color: #3498db;
}
Bootply
I have an issue related to css viewing of webview on Android 4.0.4
I have an list : using <ul> , <li> tags.
But when show on tablet 7 inches, some <li> has a different border size (> 1px).
Here is html :
<div id="cmSettingMenuList">
<ul>
<li >11111111</li>
<li >2222222</li>
<li >33333333</li>
<li >11111111</li>
<li >2222222</li>
<li >33333333</li>
<li >11111111</li>
<li >2222222</li>
<li >11111111</li>
<li >2222222</li>
<li >33333333</li>
<li >33333333</li>
<li >11111111</li>
<li >2222222</li>
<li >33333333</li>
</ul>
</div>
I use 1 css for it:
#cmSettingMenuList ul {
width: 580px;
list-style: none;
overflow: visible;
}
#cmSettingMenuList ul li {
padding-left: 2px;
height: 58px;
line-height: 58px;
border-bottom: 1px solid #9AB2E7;
background-size: 26px;
position: relative;
}
Here is display on tablet:
http://i.stack.imgur.com/RBsBL.png
It's not same size.
Do you have any solution for it.
THANKS