i only want my content (without navigation bars and header) scroll-able and not the whole page.
i have been trying for hours playing with positions, overflows and more.
i think it has something to do with the header...
i am frustrated - can anyone help?
thanks in advance!
website: https://jsfiddle.net/ronz2/0zxc13yv/3/
#import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,800,300);
*
{
margin: 0;
padding: 0;
box-sizing: border-box;
}
html
{
height: 100%;
}
body
{
font-family: 'Open Sans';
height: 100%;
min-height: 100%;
box-sizing: border-box;
overflow: hidden;
}
a
{
text-decoration: none;
}
div#header
{
width: 100%;
height: 62px;
background-color: #2980b9;
margin: 0;
}
div#mssg
{
display: inline-block;
margin: 7px;
padding: 2px;
text-align: center;
border-width: 5px;
border-color: #67C8FF;
border-style: solid;
-webkit-transition: 0.1s;
-moz-transition: 0.1s;
transition: 0.1s;
}
div#mssg p
{
font-size: 1.5em;
color: White;
}
div#mssg:hover
{
margin-top: 5px;
padding-top: 4px;
padding-bottom: 4px;
border-style: solid dashed solid dashed;
}
.logo
{
float: left;
margin-top: 4px;
margin-left: 15px;
}
.logo img
{
width: 140px;
}
div#container
{
margin-top: 62px;
width: 100%;
margin: 0;
height: 100%;
}
.sidebar
{
width: 250px;
height: 100%;
min-height: 100%;
background-color: #171717;
float: left;
}
.topbar
{
width: 100%;
background-color: #171717;
text-align: center;
}
ul#topnav li
{
display: inline-block;
list-style: none;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
transition: 0.2s;
}
ul#topnav img
{
width: 10px;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
transition: 0.2s;
}
ul#topnav li a
{
display: inline-block;
color: #ccc;
font-size: 1em;
padding-left: 5px;
padding-right: 5px;
margin-right: 0px;
border-left: 1px solid #67C8FF;
border-right: 1px solid #67C8FF;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
transition: 0.2s;
}
ul#topnav li a:hover
{
background-color: Gray;
color: #fff;
}
ul#topnav li a:hover img
{
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
transform: rotate(90deg);
}
ul#topnav ul
{
display: none;
}
ul#topnav li:hover > ul
{
display: block;
background-color: #171717;
position: absolute;
}
ul#topnav ul li
{
display: block;
margin-left: 0px;
}
ul#topnav ul li a
{
display: block;
width: 130px;
border-bottom: 1px solid #67C8FF;
border-top: 1px solid #67C8FF;
}
ul#nav li
{
list-style: none;
border-bottom: 1px solid #67C8FF;
border-top: 1px solid #67C8FF;
}
ul#nav li a
{
color: #ccc;
display: block;
padding: 10px;
font-size: 1em;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
transition: 0.2s;
}
ul#nav li a:hover
{
background-color: #030303;
color: #fff;
padding-left: 30px;
}
div#content
{
width: auto;
height: 100%;
background-image: url("../Images/spaceBG.jpg");
background-size: cover;
background-repeat: no-repeat;
padding: 15px;
overflow-y: scroll;
}
div#content h1
{
color: White;
text-shadow: 4px 0 9px rgba(86,170,255,0.9) , 0 0 30px rgba(14,134,209,1) , 0 0 30px rgba(14,134,209,1);
}
div#content p
{
color: White;
font-size: 1em;
text-shadow: 2px 1px Black;
}
div#box
{
margin-top: 15px;
}
div#box .box-top
{
color: #fff;
text-shadow: 0px 1px #000;
background-color: #2980b9;
padding: 5px;
padding-left: 15px;
font-weight: 300;
font-size: 1.5em;
}
div#box .box-panel
{
padding: 15px;
background-color: rgba(0, 20, 26, 0.89);
color: White;
font-size: 1.5em;
}
div#box .box-panel img
{
vertical-align: middle;
width: 450px;
}
.link
{
color: #67C8FF;
transition: 0.2s;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
}
.link:hover
{
color: #67C8FF;
text-shadow: 0px 0px 5px White;
}
div#box .box-panel .icon
{
width: 30px;
}
.form
{
margin-top: 10px;
margin-bottom: 10px;
}
.form fieldset legend
{
background-color: #2980b9;
padding: 0 5px 0 5px;
margin: 5px;
}
.field
{
padding-left: 15px;
color: White;
text-shadow: 2px 1px Black;
}
.input
{
padding: 10px 20px;
margin: 5px 0 5px 0;
border: 1px solid #b7b7b7;
border-radius: 3px;
color: rgba(0,142,198,1);
text-overflow: clip;
background-color: White;
-webkit-box-shadow: 0 0 5px 2px rgba(0,0,0,0.5) inset;
box-shadow: 0 0 5px 2px rgba(0,0,0,0.5) inset;
-webkit-transition: all 200ms;
-moz-transition: all 200m;
transition: all 200ms;
}
.input:focus
{
box-shadow: 0 0 5px 2px #2980b9 inset;
}
.options
{
color: White;
width: 150px;
padding: 5px;
font-size: 16px;
line-height: 1;
border-radius: 3px;
background: url(../Images/arrowDown.png) no-repeat right rgba(0,142,198,0.7);
-webkit-appearance: none;
}
.button
{
cursor: pointer;
padding: 10px 20px;
border: 1px solid #018dc4;
-webkit-border-radius: 3px;
border-radius: 3px;
color: rgba(255,255,255,1);
text-overflow: clip;
background: #0199d9;
text-shadow: 0 0 7px rgba(0,0,0,1);
-webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
-moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
}
.button:hover
{
-webkit-box-shadow: 0 0 4px 2px rgba(126,193,234,1);
box-shadow: 0 0 4px 2px rgba(126,193,234,1);
-webkit-transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
-moz-transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
transition: all 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.button:active
{
-webkit-box-shadow: 0 0 4px 1px rgba(0,0,0,0.5) inset;
box-shadow: 0 0 4px 1px rgba(0,0,0,0.5) inset;
-webkit-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
-moz-transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
transition: all 200ms cubic-bezier(0.42, 0, 0.58, 1) 10ms;
}
table
{
border-collapse: collapse;
}
table#imgs
{
padding-left: 95px;
}
table#imgs tr td
{
padding: 15px;
}
.userTable
{
font-size: 20px;
}
.userTable th , .userTable td
{
padding: 0px 2px 0px 2px;
border-bottom: 1px solid #67C8FF;
text-align: left;
border-left: 1px solid #67C8FF;
}
th.userTable
{
text-align: center;
}
.userNum
{
text-align: center;
margin-top: 10px;
}
.visit
{
color: White;
margin: 15px;
}
<head runat="server">
<title>UniSci</title>
</head>
<body>
<div id="container">
<div id="header">
<div class="logo">
<a href="Default.aspx">
<img src="Images/logo.png" alt="logo" /></a>
</div>
</div>
<div class="topbar">
<ul id="topnav">
<li><a href="darkEn.aspx">Dark Energy
</a>
<ul>
<li>Types</li>
</ul>
</li>
<li><a href="darkMat.aspx">Dark Matter
</a>
<ul>
<li>Types</li>
</ul>
</li>
<li><a href="galaxy.aspx">Galaxies
</a>
<ul>
<li>Creation</li>
<li>Types</li>
</ul>
</li>
<li><a href="gasGiant.aspx">Gas Giants
</a>
<ul>
<li>Types</li>
</ul>
</li>
<li><a href="universe.aspx">The Universe
</a>
<ul>
<li>Creation</li>
<li>Destruction</li>
</ul>
</li>
<li><a href="spacetime.aspx">Spacetime
</a>
<ul>
<li>Relativity</li>
</ul>
</li>
<li><a href="supernova.aspx">Supernova
</a>
<ul>
<li>Effect On Earth</li>
</ul>
</li>
<li><a href="star.aspx">Stars
</a>
<ul>
<li>Life Course</li>
</ul>
</li>
<li><a href="starSys.aspx">Star Systems
</a>
<ul>
<li>Multiple star</li>
<li>Types</li>
</ul>
</li>
<li><a href="universe-dest-info.aspx">Universe Death
</a>
<ul>
<li>Big Bounce</li>
<li>Big Crunch</li>
<li>Big Freeze</li>
<li>Big Rip</li>
</ul>
</li>
<li><a href="gravity.aspx">Gravity
</a>
<ul>
<li>Waves</li>
<li>Relativity</li>
</ul>
</li>
<li><a href="big-bang.aspx">Big Bang
</a>
<ul>
<li>Evidence</li>
<li>Misconceptions</li>
</ul>
</li>
<li><a href="black-hole.aspx">Black Holes
</a>
<ul>
<li>Creation</li>
<li>Destruction</li>
</ul>
</li>
<li><a href="wormhole.aspx">Wormholes
</a>
<ul>
<li>Creation</li>
<li>Shape</li>
</ul>
</li>
<li><a href="extra.aspx">Extras
</a>
<ul>
<li>Comets</li>
<li>Asteroids</li>
</ul>
</li>
</ul>
</div>
<div class="sidebar">
<ul id="nav">
<li>Main Page</li>
<li>Login</li>
<li>Register</li>
</ul>
</div>
<div id="content"> <h1>
Galaxy
</h1>
<div id="box">
<div class="box-top">
What types of galaxies are there?
</div>
<div class="box-panel">
Ellipticals:<br />
The Hubble classification system rates elliptical galaxies on <br />
the basis of their ellipticity, ranging from E0, being nearly <br />
spherical, up to E7, which is highly elongated. These galaxies <br />
have an ellipsoidal profile, giving them an elliptical appearance <br />
regardless of the viewing angle. Their appearance shows little structure <br />
and they typically have relatively little interstellar matter. <br />
Consequently, these galaxies also have a low portion of open <br />
clusters and a reduced rate of new star formation. Instead they <br />
are dominated by generally older, more evolved stars that are orbiting <br />
the common center of gravity in random directions. The stars <br />
contain low abundances of heavy elements because star formation ceases <br />
after the initial burst. In this sense they have some similarity to the <br />
much smaller globular clusters.<br />
<br />
Shell galaxy:<br />
A shell galaxy is a type of elliptical galaxy where the stars in <br />
the galaxy's halo are arranged in concentric shells. About one-tenth <br />
of elliptical galaxies have a shell-like structure, which has never<br />
been observed in spiral galaxies. The shell-like structures are <br />
thought to develop when a larger galaxy absorbs a smaller companion<br />
galaxy. As the two galaxy centers approach, the centers start to oscillate <br />
around a center point, the oscillation creates gravitational <br />
ripples forming the shells of stars, similar to ripples spreading on water. <br />
For example, galaxy NGC 3923 has over twenty shells.<br />
<br />
Spirals:<br />
Spiral galaxies resemble spiraling pinwheels. Though the stars and other<br />
visible material contained in such a galaxy lie mostly on a plane, the <br />
majority of mass in spiral galaxies exists in a roughly spherical halo of <br />
dark matter that extends beyond the visible component, as demonstrated <br />
by the universal rotation curve concept. Spiral galaxies consist of a rotating <br />
disk of stars and interstellar medium, along with a central bulge of generally <br />
older stars. Extending outward from the bulge are relatively bright arms. <br />
It appears the reason that some spiral galaxies are fat and bulging while some <br />
are flat discs is because of how fast they rotate.
</div>
The header is not problem,
The body is set to overflow:hidden which is why the bottom will not show
Change the height of the container similar to this:
#container {
margin-top: 62px;
width: 100%;
margin: 0;
height: calc(100% - 131px);
}
The problem is the exact px value you subtract: Depending on the width of the viewport, your nav is spread over a different number of lines. Either fix the height of #topnav or use media queries with different height calculations for #container.
ADDED fiddle: https://jsfiddle.net/s3qeu8vu/
Related
this is baffling me.
As I was writing CSS and testing it in my browser (safari 12.1), I noticed things weren't working as I expected, so I tried testing a few things out.
I literally copy and pasted some HTML and accompanying CSS from codepen (to test) and the CSS is only applying the very basic text-align and things like that.
Am I missing something? Do I need to change some settings or do something else to the CSS/HTML files to get it to work? I'm so confused...
I've attached a screenshot of how it's being displayed in my safari window too.
HTML:
<link href='style.css' rel='stylesheet' type='text/css'>
<h1>RESPONSIVE PRICING TABLE DESIGN <br> BY <a target="blank" href="http://www.digimadmedia.com">DIGIMAD MEDIA</h1>
<div class="price-table-wrapper">
<div class="pricing-table">
<h2 class="pricing-table__header">- BASIC -</h2>
<h3 class="pricing-table__price">£50</h3>
<a target="_blank" class="pricing-table__button" href="http://www.digimadmedia.com">
Join Now!
</a>
<ul class="pricing-table__list">
<li>30 day free trial</li>
<li>50gb storage space</li>
<li>20% discount</li>
<li>24 hour support</li>
</ul>
</div>
<div class="pricing-table featured-table">
<h2 class="pricing-table__header">- BUSINESS -</h2>
<h3 class="pricing-table__price">£80</h3>
<a target="_blank" class="pricing-table__button" href="http://www.digimadmedia.com">
Join Now!
</a>
<ul class="pricing-table__list">
<li>40 day free trial</li>
<li>100gb storage space</li>
<li>25% discount</li>
<li>24 hour support</li>
</ul>
</div>
<div class="pricing-table">
<h2 class="pricing-table__header">- PREMIUM -</h2>
<h3 class="pricing-table__price">£130</h3>
<a target="_blank" class="pricing-table__button" href="http://www.digimadmedia.com">
Join Now!
</a>
<ul class="pricing-table__list">
<li>50 day free trial</li>
<li>200gb storage space</li>
<li>40% discount</li>
<li>24 hour support</li>
</ul>
</div>
</div>
CSS:
body {
background: #f8f8f8;
}
a {
text-decoration: none;
}
h1 {
text-align: center;
font-family: "Lato", sans-serif;
font-size: 25px;
line-height: 32px;
padding-top: 70px;
a {
color: #66cccc;
}
}
.price-table-wrapper {
font-family: "Lato", sans-serif;
text-align: center;
margin-top: 30px;
.featured-table {
box-shadow: 0px 0px 19px -3px rgba(0, 0, 0, 0.36);
}
.pricing-table {
display: inline-block;
border: 1px solid #c8c8c8;
border-radius: 10px;
background: white;
margin: 20px;
transition: all 0.3s ease-in-out;
&__header {
padding: 20px;
font-size: 20px;
color: #909090;
background: #e0e0e0;
}
&__price {
color: #66cccc;
padding: 20px;
margin: auto;
font-size: 40px;
font-weight: 500;
}
&__button {
display: block;
background: #66cccc;
text-decoration: none;
padding: 20px;
color: white;
position: relative;
overflow: hidden;
transition: all 0.3s ease-in-out;
&:before {
position: absolute;
left: -20%;
top: -10%;
content: "";
width: 60%;
height: 220%;
transform: rotate(-30deg);
background: white;
opacity: 0.3;
transition: all 0.3s ease-in-out;
}
&:after {
position: absolute;
content: ">";
top: 0;
right: 0;
font-size: 25px;
padding: 15px;
padding-right: 40px;
color: white;
opacity: 0;
transition: all 0.3s ease-in-out;
}
&:hover {
background: black;
}
}
&__list {
padding: 20px;
color: #a0a0a0;
li {
padding: 15px;
border-bottom: 1px solid #c8c8c8;
&:last-child {
border: none;
}
}
}
&:hover {
box-shadow: 0px 0px 19px -3px rgba(0, 0, 0, 0.36);
.pricing-table__button {
padding-left: 0;
padding-right: 35px;
&:before {
top: -80%;
transform: rotate(0deg);
width: 100%;
}
&:after {
opacity: 1;
padding-right: 15px;
}
}
}
}
}
Your CSS isn't CSS. It is SCSS and needs transpiling to CSS with a SASS tool before a browser can make use of it.
See the SASS website for more details.
CodePen indicates this by putting SCSS in brackets.
Problem
I drew 2 overlapping figures with CSS.
Because it is translucent, overlapping parts stand out.
I want to make it translucent like this when hovering, but can we do something like synthesize figures?
(I also mind that the end of transition of two figures is different..)
What I tried
I thought that the overlapping part could be deleted with overflow: hidden;, but it was not applicable to the & :: before element which diagonal cut part got lost.
Central placement problem
I would like to centrally align the letters in the tabs in this way.
Code
html { font-size: 62.5%; }
body { background-color: #c6d2dd; }
header { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; font: inherit; vertical-align: baseline; background: transparent; box-sizing: border-box; } /* reset */
header ul {
list-style: none;
display: flex;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
width: 100%;
margin-bottom: -1px;
}
header li {
font-size: 1.5rem;
height: 4.5rem;
padding-left: .4rem;
}
header li:first-child {
padding-left: 1.5rem;
}
header li:last-child {
padding-right: .5rem;
}
header li > a {
text-decoration: none;
display: block;
padding: 1rem 2rem;
height: 100%;
color: #fff;
outline: none;
transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
position: relative;
border-radius: 9px 5px 0 0;
}
/* from here */
header li > a:hover { /* The rectangular part on the right side */
background-color: rgba(255, 255, 255, 0.4);
border-color: rgba(255, 255, 255, 0.4);
transition: background-color 0.3s ease-in, border-color 0.3s ease-in;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
}
header li > a:hover::before { /* Part of oblique cut on the left side */
background-color: rgba(255, 255, 255, 0.4);
border-color: rgba(255, 255, 255, 0.4);
transition: background-color 0.3s ease-in, border-color 0.3s ease-in;
box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.2);
}
header li > a::before { /* Part of oblique cut on the left side */
content: '';
position: absolute;
z-index: 1;
top: 0;
left: -.4rem;
bottom: 0;
width: 1rem;
transition: background-color 0.3s ease-in;
transform: skew(-15deg);
border-radius: 5px 0 0 0;
}
.current a { /* add from here */
border: 1px solid #fff;
border-bottom-width: 0;
z-index: 3;
background-color: #9bacbb;
pointer-events: none;
margin-bottom: -3px;
}
.current a::before {
border: 1px solid #fff;
background-color: #9bacbb;
margin: -1px 0 -3px -1px;
z-index: 3;
left: -.5rem;
}
.current a::after {
content: '';
position: absolute;
z-index: 3;
top: 0;
left: -.4rem;
bottom: 0;
width: 1rem;
transform: skew(-15deg);
border-radius: 5px 0 0 0;
margin-bottom: -3px;
background-color: #9bacbb;
}
.content {
display: flex;
margin: 0 1rem 1rem 1rem;
width: 100vw;
height: 61.9rem;
position: relative;
background: #9bacbb;
border: 1px solid #fff;
border-radius: 5px;
box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, 0.5);
}
<header>
<nav>
<ul>
<li class="111">
<a href="#">
111
</a>
</li>
<li class="222">
<a href="#">
222
</a>
</li>
<li class="333">
<a href="#">
333
</a>
</li>
<li class="444">
<a href="#">
444
</a>
</li>
<li class="current">
<a href="#">
555
</a>
</li>
</ul>
</nav>
</header>
<div class="content"> <!-- add -->
Hello world
</div>
I would do this differently with only one element. The trick is to have the skew and hide the overflowing part on the right:
check comment on the code
html { font-size: 62.5%; }
body { background-color: #c6d2dd; }
header { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; font: inherit; vertical-align: baseline; background: transparent; box-sizing: border-box; } /* reset */
header ul {
list-style: none;
display: flex;
align-items: center;
flex-wrap: wrap;
overflow: hidden;
width: 100%;
margin-bottom: -1px;
}
header li {
font-size: 1.5rem;
height: 4.5rem;
padding-left: .4rem;
}
header li:first-child {
padding-left: 1.5rem;
}
header li:last-child {
padding-right: .5rem;
}
header li > a {
text-decoration: none;
display: block;
padding: 1rem 1rem 1rem 3rem; /*changed the padding*/
margin-left:-2rem; /*create the overlap*/
height: 100%;
color: #fff;
outline: none;
transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
position: relative;
border-radius: 9px 5px 0 0;
overflow:hidden; /*hide the overflow*/
/*increase the z-index*/
position:relative;
z-index:2;
}
/* from here */
header li > a:hover { /* The rectangular part on the right side */
transition: background-color 0.3s ease-in, border-color 0.3s ease-in;
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
/*remove border and background from here*/
}
header li > a:hover::before { /* Part of oblique cut on the left side */
background-color: rgba(255, 255, 255, 0.4);
border-color: rgba(255, 255, 255, 0.4);
transition: background-color 0.3s ease-in, border-color 0.3s ease-in;
box-shadow: -2px 2px 2px rgba(0, 0, 0, 0.2);
}
header li > a::before { /* Part of oblique cut on the left side */
content: '';
position: absolute;
z-index: -1;
top: 0;
left: 0;
bottom: 0;
right:0; /*make right:0*/
transition: background-color 0.3s ease-in;
transform: skew(-15deg);
transform-origin:bottom right; /*change the origin*/
border-radius: 5px 0 0 0;
}
.current a {
pointer-events: none;
margin-bottom: -3px;
border-right: 1px solid #fff;
}
.current a::before {
border: 1px solid #fff;
background-color: #9bacbb;
}
.content {
display: flex;
margin: 0 1rem 1rem 1rem;
width: 100vw;
height: 61.9rem;
position: relative;
background: #9bacbb;
border: 1px solid #fff;
border-radius: 5px;
box-shadow: 0 -2px 3px -2px rgba(0, 0, 0, 0.5);
}
<header>
<nav>
<ul>
<li class="111">
<a href="#">
111
</a>
</li>
<li class="222">
<a href="#">
222
</a>
</li>
<li class="333">
<a href="#">
333
</a>
</li>
<li class="444">
<a href="#">
444
</a>
</li>
<li class="current">
<a href="#">
555
</a>
</li>
</ul>
</nav>
</header>
<div class="content"> <!-- add -->
Hello world
</div>
I am having an odd issue with certain images not displaying in Firefox, but displaying in every other browser.
You can see the differences between Chrome and Firefox here
I am using an unordered list to display a row of images that are list items. However, at the beginning of each row, I am placing a normal image in the list that is not tagged as a list item. This works perfectly in Chrome, Edge, IE and Safari but, for some reason, only a few of those images won't display in Firefox. What is confusing is that there is nothing fundamentally different about rows one and two when compared to rows three and four - that I see anyway.
It is also squishing the images in row three and four and I'm not having that issue in other browsers.
The only differences I can see are image URLs. I tried removing the disable divider to see if that made a difference and it did not.
I have created a JS Fiddle to replicate the issue.
What is included below is a greatly reduced version of what you will find using the link.
hr {
opacity: .5;
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 80px;
margin-right: 100px;
border-style: inset;
background: #00adbd;
border-top: 0.5px dotted #fff;
}
.disabledbutton {
pointer-events: none;
opacity: 0.4;
}
#outeroutside {
background-image: url("/assets/tile.jpg");
background-color: #a00f14;
width: 1300px;
max-width: 100%;
padding: 10px 10px 10px 10px;
position: relative;
}
#outside {
text-align: center;
background-color: rgba(252, 251, 245, 0.95);
width: 1200px;
max-width: 100%;
padding: 0px 10px 0px 0px;
}
#welcomemain p {
width: 95%;
display: inline-block;
text-align: center;
margin: 15px 5px;
height: auto;
}
#welcomemain img {
padding: 10px;
max-width: 100%;
}
h2 {
color: #2e1f11;
}
#outeroutside a:link {
color: #996515;
text-decoration: none;
font-weight: bold;
font-size: 16px;
}
#outeroutside a:hover {
color: #FFD700;
opacity: 0.9;
}
#outeroutside a:visited {
text-decoration: underline;
color: #996515;
}
#outeroutside a:active {
opacity: 0.5;
}
.row2 a {
color: #C0C0C0 !important;
text-decoration: none;
font-weight: bold;
font-size: 16px;
}
.row2 a:visited {
text-decoration: underline;
color: #999999;
}
.row2 a:active {
opacity: 0.5;
}
#navigation img {
padding: 10px;
max-width: 30%;
}
.youtube {
position: relative;
padding-bottom: 60%; // This is the aspect ratio
height: 0;
overflow: hidden;
}
.youtube iframe {
padding: 10px 10px 10px 30px;
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
b {
color: #312112;
}
i {
color: #b05830;
}
.font {
font-size: 15px;
}
.ih-item.circle.effect1 .spinner {
width: 270px;
height: 270px;
border: 10px groove #fdec6d;
border-right-color: #739968;
border-bottom-color: #739968;
border-radius: 50%;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .img {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
width: auto;
height: auto;
}
.ih-item.circle.effect1 .img:before {
display: none;
}
.ih-item.circle.effect1.colored .info {
background: #1a4a72;
background: rgba(26, 74, 114, 0.6);
}
.ih-item.circle.effect1 .info {
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: #333333;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 22px;
margin: 0 30px;
padding: 55px 0 0 0;
height: 110px;
text-shadow: 0 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ih-item.circle.effect1 .info p {
color: #bbb;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ih-item.circle.effect1 a:hover .spinner {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.ih-item.circle.effect1 a:hover .info {
opacity: 1;
}
.ih-item {
position: relative;
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
.ih-item,
.ih-item * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ih-item a {
color: #333;
}
.ih-item a:hover {
text-decoration: none;
}
.ih-item img {
width: 100%;
height: 100%;
}
.ih-item.circle {
position: relative;
width: 270px;
height: 270px;
border-radius: 50%;
}
.ih-item.circle .img {
position: relative;
width: 260px;
height: 260px;
border-radius: 50%;
}
.ih-item.circle .img:before {
position: absolute;
display: block;
content: '';
width: 100%;
height: 100%;
border-radius: 50%;
box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
.ih-item.circle .img img {
border-radius: 50%;
}
.ih-item.circle .info {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
border-radius: 50%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.ih-item.circle.effect1 .spinner {
width: 270px;
height: 270px;
border: 10px solid #ecab18;
border-right-color: #1ad280;
border-bottom-color: #1ad280;
border-radius: 50%;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .img {
position: absolute;
top: 0px;
bottom: 0;
left: 0px;
right: 0;
width: auto;
height: auto;
}
.ih-item.circle.effect1 .img:before {
display: none;
}
.ih-item.circle.effect1.colored .info {
background: #1a4a72;
background: rgba(26, 74, 114, 0.6)
}
.ih-item.circle.effect1 .info {
top: 0px;
bottom: 0;
left: 0px;
right: 0;
background: #333;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 20px;
margin: 0 30px;
padding: 55px 0 0 0;
height: 110px;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ih-item.circle.effect1 .info p {
color: #bbb;
padding: 11px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ih-item.circle.effect1 a:hover .spinner {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.ih-item.circle.effect1 a:hover .info {
opacity: 1;
}
.row {
margin: 5px 0px 10px 5px;
padding: 10px 3px 30px 3px;
width: 1115px;
max-width: 100%;
display: flex;
flex-wrap: nonwrap;
align-content: center;
overflow-y: hidden;
overflow-x: auto;
background-color: rgba(238, 155, 195, 0.95);
}
.row2 {
margin: 5px 0px 5px 5px;
padding: 10px 3px 15px 3px;
width: 1115px;
max-width: 100%;
display: flex;
flex-wrap: nonwrap;
align-content: center;
overflow-y: hidden;
overflow-x: auto;
background-color: rgba(238, 46, 54, 0.95);
}
.col-sm-6 li {
padding: 10px 20px 10px 20px;
max-width: 33.3%;
}
a.effect-shine:hover {
-webkit-mask-image: linear-gradient(-75deg, rgba(0, 0, 0, .6) 30%, #000 50%, rgba(0, 0, 0, .6) 70%);
-webkit-mask-size: 200%;
animation: shine 2s infinite;
}
#-webkit-keyframes shine {
from {
-webkit-mask-position: 150%;
}
to {
-webkit-mask-position: -50%;
}
<ul id="week1">
<ul class="row">
<img src="http://springfieldleather.com/assets/Scroll_Week1.1.png">
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Gator_Buckles.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>$5 Gator Buckle Sets</h3>
<p>Get a selection of 6-piece gator buckle sets for just $5. These opulent adornments are jewel encrusted and waiting to make your belt fancy!</p>
</div>
</div>
</a>
<P> Click here to see all styles! </p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Liz_CraftPack.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Liz's Craft Pack</h3>
<p>Explore the possibilities of leather craft with Liz's craft pack. Bursting at the seams with leather components, this not-so-little pack is only $25!</p>
</div>
</div>
</a>
<P> Get Liz's Craft Pack Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Stamping_Tools.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>25% Off Stamping Tools</h3>
<p>Transform your veg tan with stamping tools! For this month only, get select stamping tools at an even lower price! Nearly 100 tools are included!</p>
</div>
</div>
</a>
<P> Click here to view the selection!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_BeltBend_Black.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Black Belt Bends</h3>
<p>These Hermann Oak drum dyed belt bends are magnificent and they're on sale! Get them in black or brown. </p>
</div>
</div>
</a>
<P> Get Black Hermann Oak Belt Bend Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_BeltBend_Brown.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Brown Belt Bends</h3>
<p>These Hermann Oak drum dyed belt bends are magnificent and they're on sale! Get them in black or brown.</p>
</div>
</div>
</a>
<P> Get Brown Hermann Oak Belt Bend Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_VegTan_Split_Bundle.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Veg Tan Split Bundle</h3>
<p>Our new splitter has left us swimming in veg tan splits! Get this sweet bundle for just $15!</p>
</div>
</div>
</a>
<P> Get Your Veg Tan Split Bundle Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Jr_LegalPad_Templete.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Legal Pad Poly Template</h3>
<p>We have finally done it! Poly templates for one of our favorite projects: leather covers! Cover your legal pad in luxury with this template for only $5.</p>
</div>
</div>
</a>
<P> Get Your Legal Pad Template Here!</p>
</li>
</ul>
</ul>
<hr>
Please note: This code has a number of problems in IE due to lack of support for some features, however even IE is displaying the leading image in each row. There are small circles in the li's that appear in the JS Fiddle that do not display on my actual website.
You really need to fix your markup. As pointed out in my comment, you have invalid HTML. Regardless, to correct the display issue in FF, here is a possible solution:
Flexbox is shrinking your img. You can configure it not to. I've added flex-shrink: 0 to .row img
hr {
opacity: .5;
display: block;
margin-top: 0.5em;
margin-bottom: 0.5em;
margin-left: 80px;
margin-right: 100px;
border-style: inset;
background: #00adbd;
border-top: 0.5px dotted #fff;
}
.disabledbutton {
pointer-events: none;
opacity: 0.4;
}
#outeroutside {
background-image: url("/assets/tile.jpg");
background-color: #a00f14;
width: 1300px;
max-width: 100%;
padding: 10px 10px 10px 10px;
position: relative;
}
#outside {
text-align: center;
background-color: rgba(252, 251, 245, 0.95);
width: 1200px;
max-width: 100%;
padding: 0px 10px 0px 0px;
}
#welcomemain p {
width: 95%;
display: inline-block;
text-align: center;
margin: 15px 5px;
height: auto;
}
#welcomemain img {
padding: 10px;
max-width: 100%;
}
h2 {
color: #2e1f11;
}
#outeroutside a:link {
color: #996515;
text-decoration: none;
font-weight: bold;
font-size: 16px;
}
#outeroutside a:hover {
color: #FFD700;
opacity: 0.9;
}
#outeroutside a:visited {
text-decoration: underline;
color: #996515;
}
#outeroutside a:active {
opacity: 0.5;
}
.row2 a {
color: #C0C0C0 !important;
text-decoration: none;
font-weight: bold;
font-size: 16px;
}
.row2 a:visited {
text-decoration: underline;
color: #999999;
}
.row2 a:active {
opacity: 0.5;
}
#navigation img {
padding: 10px;
max-width: 30%;
}
.youtube {
position: relative;
padding-bottom: 60%; // This is the aspect ratio
height: 0;
overflow: hidden;
}
.youtube iframe {
padding: 10px 10px 10px 30px;
position: absolute;
top: 0;
left: 0;
width: 100% !important;
height: 100% !important;
}
b {
color: #312112;
}
i {
color: #b05830;
}
.font {
font-size: 15px;
}
.ih-item.circle.effect1 .spinner {
width: 270px;
height: 270px;
border: 10px groove #fdec6d;
border-right-color: #739968;
border-bottom-color: #739968;
border-radius: 50%;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .img {
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
width: auto;
height: auto;
}
.ih-item.circle.effect1 .img:before {
display: none;
}
.ih-item.circle.effect1.colored .info {
background: #1a4a72;
background: rgba(26, 74, 114, 0.6);
}
.ih-item.circle.effect1 .info {
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
background: #333333;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 22px;
margin: 0 30px;
padding: 55px 0 0 0;
height: 110px;
text-shadow: 0 0 1px white, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ih-item.circle.effect1 .info p {
color: #bbb;
padding: 10px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ih-item.circle.effect1 a:hover .spinner {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.ih-item.circle.effect1 a:hover .info {
opacity: 1;
}
.ih-item {
position: relative;
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
.ih-item,
.ih-item * {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.ih-item a {
color: #333;
}
.ih-item a:hover {
text-decoration: none;
}
.ih-item img {
width: 100%;
height: 100%;
}
.ih-item.circle {
position: relative;
width: 270px;
height: 270px;
border-radius: 50%;
}
.ih-item.circle .img {
position: relative;
width: 260px;
height: 260px;
border-radius: 50%;
}
.ih-item.circle .img:before {
position: absolute;
display: block;
content: '';
width: 100%;
height: 100%;
border-radius: 50%;
box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.6), 0 1px 2px rgba(0, 0, 0, 0.3);
-webkit-transition: all 0.35s ease-in-out;
-moz-transition: all 0.35s ease-in-out;
transition: all 0.35s ease-in-out;
}
.ih-item.circle .img img {
border-radius: 50%;
}
.ih-item.circle .info {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
text-align: center;
border-radius: 50%;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.ih-item.circle.effect1 .spinner {
width: 270px;
height: 270px;
border: 10px solid #ecab18;
border-right-color: #1ad280;
border-bottom-color: #1ad280;
border-radius: 50%;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .img {
position: absolute;
top: 0px;
bottom: 0;
left: 0px;
right: 0;
width: auto;
height: auto;
}
.ih-item.circle.effect1 .img:before {
display: none;
}
.ih-item.circle.effect1.colored .info {
background: #1a4a72;
background: rgba(26, 74, 114, 0.6)
}
.ih-item.circle.effect1 .info {
top: 0px;
bottom: 0;
left: 0px;
right: 0;
background: #333;
background: rgba(0, 0, 0, 0.6);
opacity: 0;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
}
.ih-item.circle.effect1 .info h3 {
color: #fff;
text-transform: uppercase;
position: relative;
letter-spacing: 2px;
font-size: 20px;
margin: 0 30px;
padding: 55px 0 0 0;
height: 110px;
text-shadow: 0 0 1px #fff, 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ih-item.circle.effect1 .info p {
color: #bbb;
padding: 11px 5px;
font-style: italic;
margin: 0 30px;
font-size: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.5);
}
.ih-item.circle.effect1 a:hover .spinner {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.ih-item.circle.effect1 a:hover .info {
opacity: 1;
}
.row {
margin: 5px 0px 10px 5px;
padding: 10px 3px 30px 3px;
width: 1115px;
max-width: 100%;
display: flex;
flex-wrap: nonwrap;
align-content: center;
overflow-y: hidden;
overflow-x: auto;
background-color: rgba(238, 155, 195, 0.95);
}
.row img {
flex-shrink: 0;
}
.row2 {
margin: 5px 0px 5px 5px;
padding: 10px 3px 15px 3px;
width: 1115px;
max-width: 100%;
display: flex;
flex-wrap: nonwrap;
align-content: center;
overflow-y: hidden;
overflow-x: auto;
background-color: rgba(238, 46, 54, 0.95);
}
.col-sm-6 li {
padding: 10px 20px 10px 20px;
max-width: 33.3%;
}
a.effect-shine:hover {
-webkit-mask-image: linear-gradient(-75deg, rgba(0, 0, 0, .6) 30%, #000 50%, rgba(0, 0, 0, .6) 70%);
-webkit-mask-size: 200%;
animation: shine 2s infinite;
}
#-webkit-keyframes shine {
from {
-webkit-mask-position: 150%;
}
to {
-webkit-mask-position: -50%;
}
<ul id="week1">
<ul class="row">
<img src="http://springfieldleather.com/assets/Scroll_Week1.1.png">
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Gator_Buckles.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>$5 Gator Buckle Sets</h3>
<p>Get a selection of 6-piece gator buckle sets for just $5. These opulent adornments are jewel encrusted and waiting to make your belt fancy!</p>
</div>
</div>
</a>
<P> Click here to see all styles! </p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Liz_CraftPack.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Liz's Craft Pack</h3>
<p>Explore the possibilities of leather craft with Liz's craft pack. Bursting at the seams with leather components, this not-so-little pack is only $25!</p>
</div>
</div>
</a>
<P> Get Liz's Craft Pack Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Stamping_Tools.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>25% Off Stamping Tools</h3>
<p>Transform your veg tan with stamping tools! For this month only, get select stamping tools at an even lower price! Nearly 100 tools are included!</p>
</div>
</div>
</a>
<P> Click here to view the selection!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_BeltBend_Black.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Black Belt Bends</h3>
<p>These Hermann Oak drum dyed belt bends are magnificent and they're on sale! Get them in black or brown. </p>
</div>
</div>
</a>
<P> Get Black Hermann Oak Belt Bend Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_BeltBend_Brown.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Brown Belt Bends</h3>
<p>These Hermann Oak drum dyed belt bends are magnificent and they're on sale! Get them in black or brown.</p>
</div>
</div>
</a>
<P> Get Brown Hermann Oak Belt Bend Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_VegTan_Split_Bundle.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Veg Tan Split Bundle</h3>
<p>Our new splitter has left us swimming in veg tan splits! Get this sweet bundle for just $15!</p>
</div>
</div>
</a>
<P> Get Your Veg Tan Split Bundle Here!</p>
</li>
<li class="col-sm-6">
<!-- normal -->
<div class="ih-item circle effect1">
<a href="#">
<div class="spinner"></div>
<div class="img"><img src="http://springfieldleather.com/assets/Week1_Jr_LegalPad_Templete.jpg" alt="img"></div>
<div class="info">
<div class="info-back">
<h3>Legal Pad Poly Template</h3>
<p>We have finally done it! Poly templates for one of our favorite projects: leather covers! Cover your legal pad in luxury with this template for only $5.</p>
</div>
</div>
</a>
<P> Get Your Legal Pad Template Here!</p>
</li>
</ul>
</ul>
<hr>
Details
I have made a div navigator for my website, there are 4 menu buttons which float left, and 1 authentication button which floats right. The navigators position is relative so it doesn't move.
CODE
body {
background-color: #2B2B2B;
}
.main {
position: relative;
top: 0%;
left: 0%;
right: 0%;
width: 101.6%;
height: 10%;
z-index: 1;
min-height: 120px;
max-height: 120px;
background-color: rgba(26, 26, 26, 0.9);
}
.logo {
display: block;
float: left;
top: 0%;
left: 0%;
right: 0%;
/*background-image: url('images/logo.png');
width: 150px;
height: 155px;*/
font-size: 32pt;
color: white;
margin-top: 3%;
margin-left: 1%;
}
.menu {
display: inline-block;
position: relative;
top: 0%;
left: 0%;
right: 0%;
background-color: rgba(26, 26, 26, 0.9);
height: 100%;
width: 101%;
border-style: solid;
border-color: rgba(26, 26, 26, 0.9);
border-radius: 0%;
z-index: 1;
max-height: 7%;
max-width: 102.5%;
min-height: 50px;
min-width: 100%;
overflow: hidden;
}
.Button1 {
display: block;
font-size: 10pt;
float: left;
right: 15%;
left: 30%;
top: 0%;
white-space: nowrap;
color: white;
margin-top: 0%;
width: 7%;
font-family: sans-serif;
height: 3%;
padding: 25px 2px 55px 2px;
vertical-align: center;
text-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button1:hover {
color: #C90205;
}
.Button2 {
font-size: 10pt;
float: left;
right: 10%;
left: 23%;
top: 10%;
white-space: nowrap;
color: white;
width: 7%;
margin-top: 0%;
font-family: sans-serif;
height: 3%;
text-align: center;
padding: 25px 0px 55px 0px;
text-align: center;
vertical-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button2:hover {
color: #C90205;
}
.Button3 {
font-size: 10pt;
float: left;
right: 10%;
left: 23%;
top: 3%;
white-space: nowrap;
color: white;
margin-top: 0%;
width: 7%;
font-family: sans-serif;
height: 3%;
text-align: center;
padding: 25px 0px 55px 0px;
text-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button3:hover {
color: #C90205;
}
.Button4 {
font-size: 10pt;
float: left;
right: 10%;
left: 23%;
top: 3%;
white-space: nowrap;
color: white;
margin-top: 0%;
width: 7%;
font-family: sans-serif;
height: 3%;
text-align: center;
padding: 25px 0px 55px 0px;
text-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button4:hover {
color: #C90205;
}
.Button5 {
font-size: 10pt;
float: left;
right: 10%;
left: 23%;
top: 3%;
white-space: nowrap;
color: white;
margin-top: 0%;
width: 7%;
font-family: sans-serif;
height: 3%;
text-align: center;
padding: 25px 0px 55px 0px;
text-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button5:hover {
color: #C90205;
}
.Button6 {
font-size: 10pt;
float: left;
right: 10%;
left: 23%;
top: 8%;
white-space: nowrap;
color: white;
margin-top: 0%;
font-family: sans-serif;
height: 10%;
width: 7%;
text-align: center;
height: 10%;
text-align: center;
padding: 28px 0px 55px 0px;
text-align: center;
line-height: 2px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
;
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
}
.Button6:hover {
color: #C90205;
}
.signin {
float: right;
width: 114px;
height: 42px;
margin-top: 0.5%;
margin-right: 1.9%;
color: red;
}
.mainpage {
height: 100%;
width: 80%;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%
}
<div class="main">
<a class="logo" href="/" style="text-decoration:none">My Website</a>
</div>
<div class="menu">
<a class="Button1" href="/" style="text-decoration:none">Button 1</a>
<a class="Button2" href="/" style="text-decoration:none">Button 2</a>
<a class="Button3" href="/" style="text-decoration:none">Button 3</a>
<a class="Button4" href="/" style="text-decoration:none">Button 4</a>
<a class="Button5" href="/support" style="text-decoration:none">Button 5</a>
<a class="Button5" href="/" style="text-decoration:none">Button 6</a>
<a class="signin" href="/login" style="text-decoration:none">AuthButton</a>
</div>
<div class="mainpage"></div>
<!-- This is page under the navigator for placing the content, right now it's empty -->
Fiddle.
Problem
Unfortunately if you look at this, and try to scroll horizontally you will see the overflow and it would just stay there, even though when I had the bottom content container mainpage div with the height of 100% and width of 80%, it would still be able to scroll down when there's nothing there at all.
As you see this code below, I have tried to limit html and body with specific resolution, which didn't fix my problem.
html, body {margin:0;padding:0;height:100%;width:100%}
Question
How could i limit my page from being scrolled in specific resolution only?
Can resolution be greater than value of 100% so it can work?
your problem is here:
.main {
width: 101.6%;
}
.mainpage {
height: 100%;
width: 80%;
}
I tweaked your code merging all those buttons classes into one. you had invalid/unused properties there.
you need to fix those properties mentioned above like this:
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
height: 100%;
background-color: #2B2B2B
}
.main {
position: relative;
top: 0;
left: 0;
right: 0;
width: 100%;
height: 10%;
min-height: 120px;
max-height: 120px;
background-color: rgba(26, 26, 26, 0.9)
}
.logo {
float: left;
top: 0;
left: 0;
right: 0;
/*background-image: url('images/logo.png');
width: 150px;
height: 155px;*/
font-size: 32pt;
color: white;
margin: 3% 0 0 1%
}
.menu {
display: inline-block;
position: relative;
top: 0;
left: 0;
right: 0;
background-color: rgba(26, 26, 26, 0.9);
border: solid rgba(26, 26, 26, 0.9);
border-radius: 0;
z-index: 1;
min-height: 50px;
min-width: 100%
}
.Button {
font-size: 10pt;
float: left;
font-family: sans-serif;
padding: 25px 2px 55px;
border: solid rgba(0, 0, 0, 0.25);
border-width: 0 1px;
white-space: nowrap;
color: white;
width: 7%;
text-align: center;
line-height: 6px;
border-radius: 5px;
min-width: 70px;
transition: 0.1s ease-in;
text-decoration: none
}
.Button:hover {
color: #C90205;
}
.signin {
float: right;
width: 114px;
height: 42px;
margin-top: 0.5%;
margin-right: 1.9%;
color: red;
}
.mainpage {
height: calc(100% - 216px);
width: 100%;
}
<div class="main">
<a class="logo" href="/" style="text-decoration:none">My Website</a>
</div>
<div class="menu">
<a class="Button b1" href="/">Button 1</a>
<a class="Button b2" href="/">Button 2</a>
<a class="Button b3" href="/">Button 3</a>
<a class="Button b4" href="/">Button 4</a>
<a class="Button b5" href="/support">Button 5</a>
<a class="Button b6" href="/">Button 6</a>
<a class="signin" href="/login">AuthButton</a>
</div>
<div class="mainpage"></div>
<!-- This is page under the navigator for placing the content, right now it's empty -->
Another approach with smaller CSS can be seen here: https://jsfiddle.net/3125ygjf/3/
Perhaps you should also have a look at the flexbox-model. There you don't have to care about the absolute positioning. The container gets display: flex; flex-direction: column;and than you can place the header, menu and main in there. You just have give the main-div the needed hight and make it scrollable. That's it.
*edit: In addition all your buttons have a width of 7% i.e. This will cause trouble later on when you change the text for example. Try to avoid such width-values.
There are several things wrong in your code, I will list as many as I could notice:
div elements by default are 100% width, so you do not need to specify it. If you are trying to make some sort of hack using more than 100% because it is not fitting the whole x-axis of your viewport, something is wrong with your code.
A class serves as a multiple selector, meaning that you can just use one class for all your buttons if they all share the same CSS properties.
If you are defining max-height and min-height with the same value, why not just use height.
body has a margin by default in different browsers, generally it is around 8px, so you can remove it by using margin: 0.
Your main css property should always come after your vendor prefixes such as -webkit-, -moz-, etc.
When you use zero in your css properties, there is no need to specify px, pt, % or any other unit, since 0 will always be computed as 0px.
JSFiddle
CODE SNIPPET:
body {
background-color: #2B2B2B;
margin: 0
}
.main {
position: relative;
height: 10%;
z-index: 1;
height: 120px;
background-color: rgba(26, 26, 26, 0.9);
}
.logo {
display: block;
float: left;
/*background-image: url('images/logo.png');
width: 150px;
height: 155px;*/
font-size: 32pt;
color: white;
margin-top: 3%;
margin-left: 1%;
}
.menu {
position: relative;
background-color: rgba(26, 26, 26, 0.9);
height: 100%;
border-style: solid;
border-color: rgba(26, 26, 26, 0.9);
border-radius: 0;
z-index: 1;
height: 50px;
overflow: hidden;
}
.btn {
font-size: 10pt;
white-space: nowrap;
color: white;
float: left;
margin-top: 0;
width: 7%;
font-family: sans-serif;
padding: 25px 0 55px 0;
vertical-align: center;
text-align: center;
line-height: 6px;
border-right: 1px solid rgba(0, 0, 0, 0.25);
border-left: 1px solid rgba(0, 0, 0, 0.25);
box-shadow: 1px 0 rgba(255, 255, 255, 0.03);
border-radius: 5px;
min-width: 70px;
-o-transition: 0.1s ease-in;
-ms-transition: 0.1s ease-in;
-moz-transition: 0.1s ease-in;
-webkit-transition: 0.1s ease-in;
transition: 0.1s ease-in;
}
.btn:hover {
color: #C90205;
}
.signin {
float: right;
width: 114px;
height: 42px;
margin-top: 0.5%;
margin-right: 1.9%;
color: red;
}
.mainpage {
height: 100%;
}
<div class="main">
<a class="logo" href="/" style="text-decoration:none">My Website</a>
</div>
<div class="menu">
<a class="btn" href="/" style="text-decoration:none">Button 1</a>
<a class="btn" href="/" style="text-decoration:none">Button 2</a>
<a class="btn" href="/" style="text-decoration:none">Button 3</a>
<a class="btn" href="/" style="text-decoration:none">Button 4</a>
<a class="btn" href="/support" style="text-decoration:none">Button 5</a>
<a class="btn" href="/" style="text-decoration:none">Button 6</a>
<a class="signin" href="/login" style="text-decoration:none">AuthButton</a>
</div>
<div class="mainpage"></div>
<!-- This is page under the navigator for placing the content, right now it's empty -->
I am learning HTML 5 and CSS3 and am having trouble with my tabbed navigation bar. I thought the li:active css stlye would achieve my goal but that only is upon click and doesn't stay that way. I have looked at many tutorials across the web and cannot find out how to do this with just CSS and HTML. I would like to avoid using javascript or php if possible. I have found information in a few places on "child" elements and using the z-index properties, and think this may be a possible solution, but do not understand how to implement them. They look how I want on hover, but I want them to stay that style when I click them to give the effect of an active tab. Any advice or help is greatly appreciated.
My HTML:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<header>
Header
</header>
<nav>
<ul id="tabs">
<li>link1</li>
<li>link2</li>
<li>link3</li>
<li>link4</li>
</ul>
</nav>
<article>
Article of Content
</article>
<aside align="right">
Aside of Content
</aside>
<footer>
<span id="cpyrt">© 2013 Footer Content</span>
</footer>
</body>
</html>
MY CSS:
body {
top: 0;
width: 80%;
position: fixed;
margin-left: 10%;
margin-right: 10%;
box-shadow: #000 0px 0px 900px;
height: 100%;
}
header {
background-color: #06F;
height: 8%;
padding: 9px;
padding-top: 25px;
box-shadow: inset #000 0px 1px 2px;
}
nav{
background-color: #333;
box-shadow: inset #000 -10px -15px 50px;
float:left;
width: inherit;
height: 59px;
}
/*--------------Navigation Tabs Styling ----- START -----------------------------*/
nav li{
list-style-type: none;
display: inline-table;
background-color: #666;
padding-top:15px;
padding-left: 25px;
padding-right: 25px;
padding-bottom:7px;
border-top-left-radius:15px;
border-top-right-radius:15px;
text-align:center;
-webkit-transition: background-color 0.2s ease, color 0.1s linear, height 0.0s ease;
-moz-transition: background-color 0.2s ease, color 0.1s linear, height 0.0s ease;
-o-transition: background-color 0.2s ease, color 0.1s linear, height 0.0s ease;
box-shadow: #000 0px 1px 10px;
color: white;
}
nav li:hover{
list-style-type: none;
display: inline-table;
background-color:#09F;
padding-top:15px;
padding-left: 25px;
padding-right: 25px;
padding-bottom:7px;
border-top-left-radius:15px;
border-top-right-radius:15px;
color: black;
text-align:center;
box-shadow: inset #FFF 0px 1px 4px;
height: 30px;
margin-top: -3px;
}
nav li:active{
list-style-type: none;
display: inline-table;
background-color:#02F;
padding-top:15px;
padding-left: 25px;
padding-right: 25px;
padding-bottom:7px;
border-top-left-radius:15px;
border-top-right-radius:15px;
border:none;
}
/*--------------Navigation Tabs Styling ----- END -----------------------------*/
article{
padding: 5px;
float: left;
background-color: #ddd;
height: inherit;
width: inherit;
box-shadow: inset #000 0px 1px 2px;
}
aside{
top: auto;
padding: 10px;
position: fixed;
right: 10%;
background-color: #CCC;
width: 17%;
height: inherit;
float: right;
box-shadow: inset #000 0px 1px 2px;
}
footer {
position: fixed;
bottom: 0;
background-color: #06F;
width: inherit;
height:8%;
padding-top: 5px;
box-shadow: inset #000 0px 1px 2px;
margin-right: 15px;
}
:active only applies to anchors (<a>) and buttons (<button>, <input type="button/>...) and only while they are pressed.
You need to take a look at :target
http://jsfiddle.net/coma/ED6cH/6/
HTML
<div class="tabbed">
<a href="#dog" id="dog">
Dog
<div>
<p>This is a dog...</p>
</div>
</a>
<a href="#cat" id="cat">
Cat
<div>
<p>This is a cat...</p>
</div>
</a>
<a href="#foo" id="foo">
Foo
<div>
<p>This is a foo...</p>
</div>
</a>
</div>
CSS
div.tabbed {
position: relative;
font-size: 0;
}
div.tabbed > a {
display: inline-block;
padding: .5em;
font-size: 16px;
border-radius: 3px 3px 0 0;
background-color: #333;
color: #eee;
text-decoration: none;
line-height: 1em;
}
div.tabbed > a + a {
margin-left: .5em;
}
div.tabbed > a:target {
color: #333;
background-color: #eee;
}
div.tabbed > a > div {
position: absolute;
top: 100%;
left: 0;
width: 300px;
padding: .5em;
border-radius: 0 3px 3px 3px;
display: none;
color: #333;
background-color: #eee;
}
div.tabbed > a:target > div {
display: block;
}
The :target pseudo selector matches what's in the URL hash (http://foo.com#this_is_the_hash) with the element having that hash string as id.
There is another hackish method using transition with very long time:
http://joelb.me/blog/2012/maintaining-css-style-states-using-infinite-transition-delays/
Insane:
http://dabblet.com/gist/2076449