When you hover over the image, you will see that it will be replaced by the text block.
When you shrink the browser, you will see that the font size remains the same, although I specified it in EMs which should have made the font responsive.
I need the layout of the hover element remain the same in mobile view, i.e. I need to avoid the scrollbar that appears if you shrink the size of the browser. Any ideas how to achieve this?
/*Programs*/
ul.img-list {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
ul.img-list li {
display: inline-block;
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
div.text-content {
background: rgba(26,33,43,0.9);
color: white;
cursor: pointer;
left: 0;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0;
font-size: 1.250em;
font-family: Roboto;
line-height: 1em;
font-weight: 300;
text-align: center;
overflow-y: auto;
box-sizing: border-box;
padding-right: 25px;
padding-left: 25px;
padding-top: 25px;
padding-bottom: 25px;
-webkit-transition: opacity 500ms;
-moz-transition: opacity 500ms;
-o-transition: opacity 500ms;
transition: opacity 500ms;
text-align: center;
vertical-align: middle;
}
ul.img-list li:hover div.text-content {
opacity: 1;
}
/* Events page */
/*Event link button*/
.btn {
background-color: transparent;
border-radius: 42px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
font-family: Roboto;
line-height: 1.750em;
font-size: 1.500em;
padding: 5px 15px 5px 15px;
margin-right: 45px;
margin-left: 45px;
}
.btn:link {
color: #ffffff;
text-decoration: none;
}
.btn:visited {
color: #1b1c16;
text-decoration: none;
}
.btn:hover {
background-color: #ffffff;
color: #1b1c16 !important;
}
.btn:active {
position: relative;
top: 1px;
}
/*All events button*/
.evens_btn {
background: ;
}
.events_btn>span{
color: #f9c70f;
font-family: Roboto;
color: #ffffff;
font-size: 1.5em !important;
background: ;
text-decoration: none !important;
padding: 10px 0px 10px 0px;
}
.events_btn>i{
color: #ffffff;
margin-right: 15px;
font-size: 3.125em;
}
.events_btn:link>i {
color: #f9c70f;
}
.events_btn:visited>i {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>i {
color: #f9c70f;
}
.events_btn:active>i {
color: #f9c70f;
}
.events_btn:link>span {
color: #f9c70f;
}
.events_btn:visited>span {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>span {
color: #f9c70f ;
}
.events_btn:active>span {
color: #f9c70f;
}
<ul class="img-list">
<li><img style="width: 100%; height: 100%;" src="http://www.sflsupport.org/wp-content/uploads/2016/06/Programs-11.jpg" />
<div class="text-content">
<div>
<h5 style="color: white; font-size: 2.375em; font-family: Montserrat; font-weight: 600; line-height: 1em; letter-spacing: 0.125em;">WEBINAR<br/>ARCHIVE</h5>
<hr style="border-top: 0.125em solid #ffffff; width: auto; margin: 0.625em 1.875em;"/>Throughout the years SFL has ammased the library of recorded webinars from some of the leading libertarian voices about numerous topics in philosophy, politics, and economics. How can the government fix the higher education bubble? What is Ayn Rand's theory of natural rights? Tune in to our videos for answers to these questions and many more.
<br>
<a class="btn" style="color: white; text-align: center; margin-top: 0.625em; padding-top: 0.313em; padding-bottom: 0.313em; padding-left: 1.875em; padding-right: 1.875em; text-decoration: none; font-size: 1.500em; font-weight: 600; border: 3px solid white; letter-spacing: 0.125em;" href="http://www.google.com/" target="_blank">READ MORE</a>
</div>
</div>
</li>
</ul>
You can simply set the font size in vw instead of em
/*Programs*/
ul.img-list {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
ul.img-list li {
display: inline-block;
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
div.text-content {
background: rgba(26,33,43,0.9);
color: white;
cursor: pointer;
left: 0;
position: absolute;
top: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0;
font-size: 3vw;
font-family: Roboto;
line-height: 1em;
font-weight: 300;
text-align: center;
overflow-y: auto;
box-sizing: border-box;
padding-right: 25px;
padding-left: 25px;
padding-top: 25px;
padding-bottom: 25px;
-webkit-transition: opacity 500ms;
-moz-transition: opacity 500ms;
-o-transition: opacity 500ms;
transition: opacity 500ms;
text-align: center;
vertical-align: middle;
}
ul.img-list li:hover div.text-content {
opacity: 1;
}
/* Events page */
/*Event link button*/
.btn {
background-color: transparent;
border-radius: 42px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
font-family: Roboto;
line-height: 1.750em;
font-size: 1.500em;
padding: 5px 15px 5px 15px;
margin-right: 45px;
margin-left: 45px;
}
.btn:link {
color: #ffffff;
text-decoration: none;
}
.btn:visited {
color: #1b1c16;
text-decoration: none;
}
.btn:hover {
background-color: #ffffff;
color: #1b1c16 !important;
}
.btn:active {
position: relative;
top: 1px;
}
/*All events button*/
.evens_btn {
background: ;
}
.events_btn>span{
color: #f9c70f;
font-family: Roboto;
color: #ffffff;
font-size: 1.5em !important;
background: ;
text-decoration: none !important;
padding: 10px 0px 10px 0px;
}
.events_btn>i{
color: #ffffff;
margin-right: 15px;
font-size: 3.125em;
}
.events_btn:link>i {
color: #f9c70f;
}
.events_btn:visited>i {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>i {
color: #f9c70f;
}
.events_btn:active>i {
color: #f9c70f;
}
.events_btn:link>span {
color: #f9c70f;
}
.events_btn:visited>span {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>span {
color: #f9c70f ;
}
.events_btn:active>span {
color: #f9c70f;
}
<ul class="img-list">
<li><img style="width: 100%; height: 100%;" src="http://www.sflsupport.org/wp-content/uploads/2016/06/Programs-11.jpg" />
<div class="text-content">
<div>
<h5 style="color: white; font-size: 2.375em; font-family: Montserrat; font-weight: 600; line-height: 1em; letter-spacing: 0.125em;">WEBINAR<br/>ARCHIVE</h5>
<hr style="border-top: 0.125em solid #ffffff; width: auto; margin: 0.625em 1.875em;"/>Throughout the years SFL has ammased the library of recorded webinars from some of the leading libertarian voices about numerous topics in philosophy, politics, and economics. How can the government fix the higher education bubble? What is Ayn Rand's theory of natural rights? Tune in to our videos for answers to these questions and many more.
<br>
<a class="btn" style="color: white; text-align: center; margin-top: 0.625em; padding-top: 0.313em; padding-bottom: 0.313em; padding-left: 1.875em; padding-right: 1.875em; text-decoration: none; font-size: 1.500em; font-weight: 600; border: 3px solid white; letter-spacing: 0.125em;" href="http://www.google.com/" target="_blank">READ MORE</a>
</div>
</div>
</li>
</ul>
Related
So, if i would click "PROJECTEN", it would allegedly bring me to the PROJECTEN page, but instead it just does the animation that i asked it to.
That is the html, now for the CSS of the Home page:
body{
background-color: black;
}
.projectenknop{
position: relative;
border-radius: 0 50px 0 50px;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 25%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.projectenknop:after {
content: "";
background: #f1f1f1;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.projectenknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.overknop {
position: relative;
border-radius: 50px 0 50px 0;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 50%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.overknop:after {
content: "";
background: #f1f1f1;
display: block;
right: 0;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.overknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
#tekstkader{
border: 0.1px solid black;
width: 29.5vw;
height: 180vh;
margin: 13.4% 0 0 35.5%;
text-align: center;
font-family: "Bebas Neue";
color: black;
opacity: 0.7;
font-size: 1.5vw;
}
#linkprojecten:link{
color: azure;
text-decoration: none;
}
#linkprojecten:visited{
color: azure;
text-decoration: none;
}
#linkprojecten:hover{
color: azure;
text-decoration: none;
}
#linkprojecten:active{
color: azure;
text-decoration: none;
}
<div class="rij">
<div class="kol-6 kol-t-6 kol-m-6">
<button class="projectenknop"><a id="linkprojecten" href="projecten.html">PROJECTEN</a></button>
</div>
<div class="kol-6 kol-t-6 kol-m-6">
<button class="overknop">OVER</button>
</div>
</div>
<div id="tekstkader">
<br>Dit is een fanpagina over Alicha De Bevere,<br>een grafische studente in Ter Sterre.
</div>
And now the PROJECTEN HTML and CSS:
body{
background-color: black;
}
.homeknop {
position: relative;
border-radius: 0 50px 0 50px;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 25%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.homeknop:after {
content: "";
background: #f1f1f1;
display: block;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
transition-duration: 0.8s;
opacity: 0;
}
.homeknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
.overknop {
position: relative;
border-radius: 50px 0 50px 0;
border: 1px solid white;
font-family: "Bebas Neue";
font-size: 2vw;
color: #ffffff;
margin: 10% 0 0 50%;
width: 10vw;
text-align: center;
transition-duration: 0.4s;
text-decoration: none;
overflow: hidden;
cursor: pointer;
background-color: transparent;
}
.overknop:after {
content: "";
background: #f1f1f1;
display: block;
right: 0;
position: absolute;
padding-top: 300%;
padding-left: 350%;
margin-left: -20px !important;
margin-top: -120%;
opacity: 0;
transition-duration: 0.8s;
}
.overknop:active:after {
padding: 0;
margin: 0;
opacity: 1;
transition: 0s;
}
#linkhome:link{
color: azure;
text-decoration: none;
}
#linkhome:visited{
color: azure;
text-decoration: none;
}
#linkhome:hover{
color: azure;
text-decoration: none;
}
#linkhome:active{
color: azure;
text-decoration: none;
}
<video autoplay muted loop id="bgvideo">
<source src="BGVIDEOPROJECTEN.mp4" type="video/mp4">
</video>
<div class="rij">
<div class="kol-6 kol-t-6 kol-m-6">
<button class="homeknop"><a id="linkhome" href="index.html">HOME</a></button>
</div>
<div class="kol-6 kol-t-6 kol-m-6">
<button class="overknop">OVER</button>
</div>
</div>
So yeah, cant figure it out.
And also i wanted to make the button do the animation after i hover, but it just doesnt work. It gets buggy and is all over the place.
Try switching the order of the link and button, i.e. putting the <button> inside of the <a> instead.
When you hover over the image, you will see that it will be replaced by the semi-transparent background in my code.
The transparent background is supposed to cover all the picture, however, it only covers the area taken by the text.
How do I make sure that it covers the whole picture, regardless of the text within the box?
/*Programs*/
ul.img-list {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
ul.img-list li {
display: inline-block;
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
div.text-content {
background: rgba(26,33,43,0.9);
color: white;
cursor: pointer;
display: table;
left: 0;
position: absolute;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
font-size: 20px;
font-family: Roboto;
line-height: 24px;
font-weight: 200;
text-align: center;
overflow-y: auto;
padding-right: 25px;
padding-left: 25px;
padding-top: 25px;
padding-bottom: 25px;
box-sizing: border-box;
-webkit-transition: opacity 500ms;
-moz-transition: opacity 500ms;
-o-transition: opacity 500ms;
transition: opacity 500ms;
overflow-y: auto;
}
div.text-content div {
display: block;
text-align: center;
vertical-align: middle;
}
ul.img-list li:hover div.text-content {
opacity: 1;
}
/* Events page */
/*Event link button*/
.btn {
background-color: transparent;
border-radius: 42px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
font-family: Roboto;
line-height: 28px;
font-size: 24px;
padding: 5px 15px 5px 15px;
margin-right: 45px;
margin-left: 45px;
}
.btn:link {
color: #ffffff;
text-decoration: none;
}
.btn:visited {
color: #1b1c16;
text-decoration: none;
}
.btn:hover {
background-color: #ffffff;
color: #1b1c16 !important;
}
.btn:active {
position: relative;
top: 1px;
}
/*All events button*/
.evens_btn {
background: ;
}
.events_btn>span{
color: #f9c70f;
font-family: Roboto;
color: #ffffff;
font-size: 24px !important;
background: ;
text-decoration: none !important;
padding: 10px 0px 10px 0px;
}
.events_btn>i{
color: #ffffff;
margin-right: 15px;
font-size: 50px;
}
.events_btn:link>i {
color: #f9c70f;
}
.events_btn:visited>i {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>i {
color: #f9c70f;
}
.events_btn:active>i {
color: #f9c70f;
}
.events_btn:link>span {
color: #f9c70f;
}
.events_btn:visited>span {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>span {
color: #f9c70f ;
}
.events_btn:active>span {
color: #f9c70f;
}
<ul class="img-list">
<li><img style="width: 100%; height: 100%;" src="http://www.sflsupport.org/wp-content/uploads/2016/06/Programs-11.jpg" />
<div class="text-content">
<div>
<h5 style="color: white; font-size: 38px; font-family: Montserrat; font-weight: 600; line-height: 42px; letter-spacing: 2px;">WEBINAR<br/>ARCHIVE</h5>
<hr style="border-top: 2px solid #ffffff; width: auto; margin: 10px 30px;"/>Throughout the years SFL has ammased the library of recorded webinars from some of the leading libertarian voices about numerous topics in philosophy, politics, and economics. How can the government fix the higher education bubble? What is Ayn Rand's theory of natural rights? Tune in to our videos for answers to these questions and many more.
<br>
<a class="btn" style="color: white; text-align: center; margin-top: 10px; padding-top: 5px; padding-bottom: 5px; padding-left: 30px; padding-right: 30px; text-decoration: none; font-size: 24px; font-weight: 600; border: 3px solid white; letter-spacing: 2px;" href="http://www.google.com/" target="_blank">READ MORE</a>
</div>
</div>
</li>
</ul>
Remove display:table; from .text-content. Also add bottom:0; to it.
Remove display: table;, and for aligning the content vertically center use CSS Flexbox's align-content property.
Have a look at the snippet below:
/*Programs*/
ul.img-list {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
ul.img-list li {
display: inline-block;
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
div.text-content {
background: rgba(26,33,43,0.9);
color: white;
cursor: pointer;
display: flex;
align-items: center;
left: 0;
position: absolute;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
font-size: 20px;
font-family: Roboto;
line-height: 24px;
font-weight: 200;
text-align: center;
overflow-y: auto;
padding-right: 25px;
padding-left: 25px;
padding-top: 25px;
padding-bottom: 25px;
box-sizing: border-box;
-webkit-transition: opacity 500ms;
-moz-transition: opacity 500ms;
-o-transition: opacity 500ms;
transition: opacity 500ms;
overflow-y: auto;
}
div.text-content div {
display: block;
text-align: center;
vertical-align: middle;
}
ul.img-list li:hover div.text-content {
opacity: 1;
}
/* Events page */
/*Event link button*/
.btn {
background-color: transparent;
border-radius: 42px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
font-family: Roboto;
line-height: 28px;
font-size: 24px;
padding: 5px 15px 5px 15px;
margin-right: 45px;
margin-left: 45px;
}
.btn:link {
color: #ffffff;
text-decoration: none;
}
.btn:visited {
color: #1b1c16;
text-decoration: none;
}
.btn:hover {
background-color: #ffffff;
color: #1b1c16 !important;
}
.btn:active {
position: relative;
top: 1px;
}
/*All events button*/
.evens_btn {
background: ;
}
.events_btn>span{
color: #f9c70f;
font-family: Roboto;
color: #ffffff;
font-size: 24px !important;
background: ;
text-decoration: none !important;
padding: 10px 0px 10px 0px;
}
.events_btn>i{
color: #ffffff;
margin-right: 15px;
font-size: 50px;
}
.events_btn:link>i {
color: #f9c70f;
}
.events_btn:visited>i {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>i {
color: #f9c70f;
}
.events_btn:active>i {
color: #f9c70f;
}
.events_btn:link>span {
color: #f9c70f;
}
.events_btn:visited>span {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>span {
color: #f9c70f ;
}
.events_btn:active>span {
color: #f9c70f;
}
<ul class="img-list"><li><img style="width: 100%; height: 100%;" src="http://www.sflsupport.org/wp-content/uploads/2016/06/Programs-11.jpg" /><div class="text-content"><div><h5 style="color: white; font-size: 38px; font-family: Montserrat; font-weight: 600; line-height: 42px; letter-spacing: 2px;">WEBINAR<br/>ARCHIVE</h5><hr style="border-top: 2px solid #ffffff; width: auto; margin: 10px 30px;"/>Throughout the years SFL has ammased the library of recorded webinars from some of the leading libertarian voices about numerous topics in philosophy, politics, and economics. How can the government fix the higher education bubble? What is Ayn Rand's theory of natural rights? Tune in to our videos for answers to these questions and many more.<br><a class="btn" style="color: white; text-align: center; margin-top: 10px; padding-top: 5px; padding-bottom: 5px; padding-left: 30px; padding-right: 30px; text-decoration: none; font-size: 24px; font-weight: 600; border: 3px solid white; letter-spacing: 2px;" href="http://www.google.com/" target="_blank">READ MORE</a></div></div></li></ul>
Hope this helps!
/*Programs*/
ul.img-list {
list-style-type: none;
margin: 0;
padding: 0;
text-align: center;
}
ul.img-list li {
display: inline-block;
width: 100%;
height: 100%;
margin: 0;
position: relative;
}
div.text-content {
background: rgba(26,33,43,0.9);
color: white;
cursor: pointer;
left: 0;
position: absolute;
top: 0;
width: 100%;
height: 100%;
opacity: 0;
font-size: 20px;
font-family: Roboto;
line-height: 24px;
font-weight: 200;
text-align: center;
overflow-y: auto;
padding-right: 25px;
padding-left: 25px;
padding-top: 25px;
padding-bottom: 25px;
box-sizing: border-box;
-webkit-transition: opacity 500ms;
-moz-transition: opacity 500ms;
-o-transition: opacity 500ms;
transition: opacity 500ms;
overflow-y: auto;
}
div.text-content div {
display: table-cell;
text-align: center;
vertical-align: middle;
width: 100%;
height: 100%;
}
ul.img-list li:hover div.text-content {
opacity: 1;
}
/* Events page */
/*Event link button*/
.btn {
background-color: transparent;
border-radius: 42px;
border: 2px solid #ffffff;
display: inline-block;
cursor: pointer;
font-family: Roboto;
line-height: 28px;
font-size: 24px;
padding: 5px 15px 5px 15px;
margin-right: 45px;
margin-left: 45px;
}
.btn:link {
color: #ffffff;
text-decoration: none;
}
.btn:visited {
color: #1b1c16;
text-decoration: none;
}
.btn:hover {
background-color: #ffffff;
color: #1b1c16 !important;
}
.btn:active {
position: relative;
top: 1px;
}
/*All events button*/
.evens_btn {
background: ;
}
.events_btn>span{
color: #f9c70f;
font-family: Roboto;
color: #ffffff;
font-size: 24px !important;
background: ;
text-decoration: none !important;
padding: 10px 0px 10px 0px;
}
.events_btn>i{
color: #ffffff;
margin-right: 15px;
font-size: 50px;
}
.events_btn:link>i {
color: #f9c70f;
}
.events_btn:visited>i {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>i {
color: #f9c70f;
}
.events_btn:active>i {
color: #f9c70f;
}
.events_btn:link>span {
color: #f9c70f;
}
.events_btn:visited>span {
color: #ffffff;
text-decoration: none;
}
.events_btn:hover>span {
color: #f9c70f ;
}
.events_btn:active>span {
color: #f9c70f;
}
<ul class="img-list"><li><img style="width: 100%; height: 100%;" src="http://www.sflsupport.org/wp-content/uploads/2016/06/Programs-11.jpg" /><div class="text-content"><div><h5 style="color: white; font-size: 38px; font-family: Montserrat; font-weight: 600; line-height: 42px; letter-spacing: 2px;">WEBINAR<br/>ARCHIVE</h5><hr style="border-top: 2px solid #ffffff; width: auto; margin: 10px 30px;"/>Throughout the years SFL has ammased the library of recorded webinars from some of the leading libertarian voices about numerous topics in philosophy, politics, and economics. How can the government fix the higher education bubble? What is Ayn Rand's theory of natural rights? Tune in to our videos for answers to these questions and many more.<br><a class="btn" style="color: white; text-align: center; margin-top: 10px; padding-top: 5px; padding-bottom: 5px; padding-left: 30px; padding-right: 30px; text-decoration: none; font-size: 24px; font-weight: 600; border: 3px solid white; letter-spacing: 2px;" href="http://www.google.com/" target="_blank">READ MORE</a></div></div></li></ul>
Just add this Css:
.text-content div{
height:1326px;
}
So I am trying to align the toggle button I'm creating using CSS to be aligned with the 'paragraph description' as I'd like to call it but I can't seem to make it look the way I wanted it to look. I've not only provided a wireframe but a jsfiddle as well.
HTML code:
<p id="displayOption">Display Options</p>
<div id="onoffSwitch">
<ul id="btn" class="btn">
<li class="display-title" id="spoilers">
<span id="spoilerSwitch">Show/Hide Spoilers:</span>
<ul class="selector">
<li class="on">
<span class="onoffswitch-inner">
</li>
<li class="off">
<span class="onoffswitch-switch"></span></span>
</li>
</ul>
</li>
<li class="display-title" id="day-night">
<span id="day-nightSwitch">Day or Night Vision:</span>
<ul class="selector">
</ul>
</ul>
</div>
CSS code:
/***** options *****/
#displayOption {
text-align: center;
font-family: "Comic Sans MS", cursive, sans-serif;
border: .88px #efdaae;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
/*-moz-border-radius: 10px;
-webkit-border-radius: 10px;*/
width: 258px;
background-color: #945e38;
padding: .1px;
margin: 0px;
font-variant: small-caps;
font-size: 1.5em;
color: #fdfdfa;
}
#displayOption-invert {
text-align: center;
font-family: "Comic Sans MS", cursive, sans-serif;
border: .88px #efdaae;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
/*-moz-border-radius: 10px;
-webkit-border-radius: 10px;*/
width: 258px;
background-color: #efdaae;
padding: .1px;
margin: 0px;
font-variant: small-caps;
font-size: 1.5em;
color: #030303;
}
#onoffSwitch {
font-family: "Comic Sans MS", cursive, sans-serif;
border: 1px solid #945e38;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
padding: 7px 10px;
line-height: normal;
text-align: left;
padding-bottom: 18px;
color: #000000;
}
#onoffSwitch-invert {
font-family: "Comic Sans MS", cursive, sans-serif;
border: 1px solid #efdaae;
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
padding: 7px 10px;
line-height: normal;
text-align: left;
padding-bottom: 18px;
color: #ffffff;
}
/*** unordered list ***/
#btn, #btn ul {
padding: 0px;
margin: 0px;
list-style-type: none; /*bullet removel*/
list-style: none; /*bullet removel*/
text-decoration: none; /*bullet removel*/
}
.display-title {
display: inline-block;
}
/*** text ***/
#spoilerSwitch, #daynightVision {
font-family: "Comic Sans MS", cursive, sans-serif;
line-height: normal;
color: #000000;
text-align: left;
margin-bottom: 10px;
}
#spoilerSwitch-invert, #daynightVision-invert {
font-family: "Comic Sans MS", cursive, sans-serif;
line-height: normal;
color: #FFFFFF;
text-align: left;
margin-bottom: 10px;
}
/*** toggle button ***/
.onoffswitch {
position: relative;
width: 50px;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select: none;
}
.onoffswitch-checkbox {
display: none;
}
.onoffswitch-label, .onoffswitchInvert-label {
display: block;
overflow: hidden;
cursor: pointer;
border: 2px solid #999999;
border-radius: 0px;
}
.onoffswitch-inner, .offswitchInvert-inner {
display: block;
width: 200%;
margin-left: 100%;
transition: margin 0.3s ease-in 0s;
}
.onoffswitch-inner:before, .onoffswitch-inner:after {
display: block;
float: left;
width: 50%;
height: 30px;
padding: 0;
line-height: 26px;
font-size: 14px;
color: white;
font-family: Trebuchet, Arial, sans-serif;
font-weight: bold;
box-sizing: border-box;
border: 2px solid transparent;
background-clip: padding-box;
}
.onoffswitch-inner:before {
content: "";
padding-left: 10px;
background-color: #2E8DEF;
color: #FFFFFF;
}
.onoffswitch-inner:after {
content: "";
padding-right: 10px;
background-color: #CCCCCC; color: #333333;
text-align: right;
}
.onoffswitch-switch {
display: block;
width: 25px;
margin: 0px;
background: #000000;
position: absolute;
top: 0;
bottom: 0;
right: 65px;
transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-inner {
margin-left: 0;
}
.onoffswitch-checkbox:checked + .onoffswitch-label .onoffswitch-switch {
right: 0px;
}
Looking in Element browser in Google Chrome, you have this class messed up
.onoffswitch-inner:before, .onoffswitch-inner:after {
You should not be using "width: x%". You should change the % to some unit such as px.
I am making a microsite via Dreamweaver using the fluid layout. In it, I had my header and banner inside a table under a div like so:
<div id="divHeader">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tbody>
<tr>
<td style="width: 30px;"></td>
<td style="vertical-align: middle; font-size: 1.3rem; font-weight: bold;">
<p><span>Move Toward </span> <span class="hdr">Zero Unplanned Downtime</span></p>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<img src="images/Mining_site_1192x181-12.png" alt=""/>
</td>
</tr>
</tbody>
</table>
</div>
In most browsers, this works well (including mobile browsers):
Unfortunately, in Firefox, it's shown this way:
When I used the built-in Inspect Elemet, this is what I see in Firefox:
For some reason, the table is displayed outside the DIV element. The table doesn't have a CSS class associated with it, and as for the DID, this is the CSS for its class divHeader:
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
Is there an issue with tables within div in Firefox? If so, what's a good workaround?
Here is my CSS code:
#charset "utf-8";
/* Simple fluid media
Note: Fluid media requires that you remove the media's height and width attributes from the HTML
http://www.alistapart.com/articles/fluid-images/
*/
img, object, embed, video {
max-width: 100%;
}
a {
text-decoration: none;
}
a: hover {
color: #F59D51;
text-decoration: none;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
width:100%;
}
/*
Dreamweaver Fluid Grid Properties
----------------------------------
dw-num-cols-mobile: 4;
dw-num-cols-tablet: 8;
dw-num-cols-desktop: 12;
dw-gutter-percentage: 25;
Inspiration from "Responsive Web Design" by Ethan Marcotte
http://www.alistapart.com/articles/responsive-web-design
and Golden Grid System by Joni Korpi
http://goldengridsystem.com/
*/
.fluid {
clear: both;
margin-left: 0;
width: 100%;
float: left;
display: block;
}
.fluidList {
list-style:none;
list-style-image:none;
margin:0;
padding:0;
}
/* Mobile Layout: 480px and below. */
.gridContainer {
margin-left: auto;
margin-right: auto;
width: 86.45%;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
background-color: #fff;
}
.zeroMargin_mobile {
margin-left: 0;
}
.hide_mobile {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner480.png);
background-position: bottom;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 480px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 100%;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.9rem;
line-height: 1rem;
margin-left: 0px;
padding-left: 15px;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr li.q1 {
list-style-image:url(../images/icons/question_icon.jpg)
}
.ulNltr li.c1 {
list-style-image:url(../images/icons/contact_icon.jpg)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */
#media only screen and (min-width: 481px) {
.gridContainer {
margin-left: auto;
margin-right: auto;
width: 90.675%; /*width: 480px;*/
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
background-color: #fff;
}
.zeroMargin_tablet {
margin-left: 0;
}
.hide_tablet {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner768.png);
background-position: bottom;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 480px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 100%;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
/* Desktop Layout: 769px to a max of 1079px. Inherits styles from: Mobile Layout and Tablet Layout. */
#media only screen and (min-width: 769px) {
.gridContainer {
width: 88.5%; /*width: 768px;*/
max-width: 768px;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
margin-left: auto;
margin-right: auto;
background-color: #fff;
}
.zeroMargin_desktop {
margin-left: 0;
}
.hide_desktop {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_v2_Banner768.png);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 768px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 33%;
float: left;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.cntRw {
display: table-cell;
}
div.divBack {
width: 100%;
text-align: center;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
/* Desktop Layout: 1080p and beyond. Inherits styles from: Mobile Layout and Tablet Layout. */
#media only screen and (min-width: 1079px) {
.gridContainer {
width: 88.5%; /*width: 1192px; */
max-width: 1192px;
padding-left: 0.75%;
padding-right: 0.75%;
margin: auto;
clear: none;
float: none;
margin-left: auto;
margin-right: auto;
background-color: #fff;
}
.zeroMargin_desktop {
margin-left: 0;
}
.hide_desktop {
display: none;
}
#divEPMLogo {
background-color:#fff;
}
#divHeader {
font-family: Arial;
background-color: #F89329;
text-transform: uppercase;
font-size: 1rem;
color: #fff;
line-height: 1rem;
border: none;
clear: right;
}
#divHeader td.tdBanner {
background-image: url(../images/Mining_site_1192x181-12.png);
background-position: center;
background-repeat: no-repeat;
background-size: contain;
height: 181px;
max-width: 1191px;
margin: 0px;
}
#divSubheader {
font-family: Arial;
background-color: #fff;
text-transform: uppercase;
font-size: 1rem;
color: #4D4F44;
line-height: 1.3rem;
border: none;
}
div.divCnt {
width: 33%;
float: left;
border: none;
}
#content header {
font-size: 1.1rem;
font-weight: bold;
color: #4D4F44;
font-family: Arial;
}
#content article {
font-size: 1rem;
color: #818183;
font-family: Arial;
}
#content hr {
width: 100%;
height: 3px;
color: #FFD022;
background-color: #FFD022;
border: none;
margin-top: 0px;
}
div.cntRw {
display: table-cell;
}
div.divBack {
width: 100%;
text-align: center;
margin: 0px;
}
div.divBack a {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
text-decoration: none;
}
div.divBack a:hover {
color: #F89329;
text-decoration: none;
}
div.divRM {
color: #818183;
font-size: 0.9rem;
font-family: Arial;
}
div.divRMBtn {
color: #fff;
background-color: #F89329;
text-align: center;
font-size: 0.9rem;
width: 6rem;
padding: 3px 0px;
font-family: Arial;
}
div.divRMBtn a {
color: #fff;
text-decoration: none;
}
div.divRMBtn a:hover {
color: #fff;
text-decoration: none;
}
div.divSecFt {
font-size: 0.8rem;
font-style: italic;
font-family: Arial;
padding: 10px 0px;
}
div.divSecFt a {
color: #4D4F44;
text-decoration: none;
}
div.divSecFt a:hover {
color: #F89329;
text-decoration: none;
}
div.container1 {
display:table-cell;
vertical-align: middle;
border: 1px solid black;
/*padding: 0px 0px 0px 30px;*/
position: relative;
left: 30px;
}
div.divForm {
font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
text-align: left; width:50%;
height: 26rem;
min-width: 320px;
margin: 0 auto;
color:#4B4B4B;
border: none;
}
span.hdr {
color: #4D4F44;
text-wrap: none;
}
span.hdr2 {
color: #F59D51;
text-transform: uppercase;
font-size: 1.1rem;
font-weight: bold;
}
td.td-ico {
width: 73px;
max-width: 73px;
min-width: 73px;
text-align: center;
vertical-align: top;
padding-right: 5px;
}
.ulNltr{
color: #4D4F44;
font-family: Arial;
font-size: 0.8rem;
line-height: 1rem;
}
.ulNltr li {
padding-bottom: 10px;
list-style-image:url(../images/icons/bullet.png)
}
.ulNltr a {
color: #4D4F44;
text-decoration: none;
}
.ulNltr a:hover {
color: #F89329;
text-decoration: none;
}
}
It does seem that Firefox is having problems with the table within the div. I changed the HTML part to this:
<!-- Page header and banner -->
<div id="divHeader">
<div style="display: table-cell; vertical-align: middle;">
<p>Move Toward <span class="hdr">Zero Unplanned Downtime</span></p>
</div>
</div>
<div id="divHBanner">
<img src="images/Mining_site_1192x181-12.png" alt=""/>
</div>
<!-- End Page header and banner -->
It fixed the original error, but it opened up another. I will post a separate question for that instead.
I have tried in jsfiddle and in my web test page and everything is okay when I remove #charset"utf-8";
when I set it again, it went collided again
I have a page but when I resize the browser window the background color gets cut down. I want the color to expand to the full browser width. One of my divs is bigger than the other ones. What is the fix for this?
The CSS is below:
#charset "utf-8";
/* ==========================================================================
RESET STYLES
========================================================================== */
* {
margin: 0; padding: 0;
}
html,
button,
input,
select,
textarea {
color: #222;
}
body {
font-size: 1em;
line-height: 1.4;
}
img {
border: 0 none;
}
/* ==========================================================================
BASE STYLES
========================================================================== */
html {
height: 100%;
}
body {
font-family: Arial, Helvetica Sans-serif;
width: 100%;
height: 100%;
color: #595959;
}
.col-full {
width: 1014px;
margin: 0 auto;
}
h1, h2, h3, h4, h5, h6 {
font-family: Helvetica, Arial, Sans-serif;
}
/* ==========================================================================
HEADER STYLES
========================================================================== */
#header h1 {
margin-top: 26px;
float: left;
}
h1 a span {
display: none;
}
#login-form {
float: right;
margin: 25px 92px 12px 0;
}
#login-form input {
width: 150px;
height: 29px;
line-height: 29px;
border: 1px solid #a5a5a5;
color: #797979;
font-size: 14px;
padding-left: 8px;
margin-left: 3px;
}
#login-form #login-button {
width: 72px;
height: 30px;
background: url(../img/login-bg.png) top repeat-x;
border: 1px solid #494949;
cursor: pointer;
margin-left: 0;
font-weight: bold;
color: #FFF;
font-size: 13px;
padding-left: 0;
text-shadow: 1px 1px 1px #3f3f3f;
filter: dropshadow(color=#3f3f3f, offx=1, offy=1);
}
.form-buttons {
margin-left: 3px;
}
.form-buttons a {
text-decoration: none;
font-size: 12px;
color: #ef4926;
margin-right: 116px;
}
.nav {
clear: both;
width: 100%;
height: 47px;
background: #000;
}
.nav ul {
margin-top: 10px;
float: left;
}
.nav ul li {
float: left;
list-style: none;
margin-right: 53px;
}
.nav ul li a {
text-decoration: none;
font-family: Helvetica;
font-weight: bold;
color: #FFF;
/*font-size: 16px;*/
font-size: 15px;
}
.top-heading {
background: #363737;
height: 57px;
border-top: 1px solid #727272;
border-bottom: 1px solid #727272;
}
.top-heading h2 {
/*font-size: 28px;*/
font-size: 27px;
color: #FFF;
text-shadow: 1px 1px 2px #282929;
filter: dropshadow(color=#282929, offx=1, offy=1);
padding-top:8px;
}
#featured {
background: url(../img/featured-gd.png) repeat-x;
}
#featured .col-full {
background: url(../img/featured-bg.jpg) no-repeat;
}
.featured-content {
width: 454px;
float: left;
margin-right: 40px;
}
.featured-content h2 {
color: #FFF;
/*font-size: 38px;*/
font-size: 37px;
line-height: 1.15;
margin-top: 45px;
margin-bottom: 12px;
text-shadow: 1px 1px 2px #282929;
filter: dropshadow(color=#282929, offx=1, offy=1);
}
.featured-content p {
font-size: 15px;
color: #FFF;
line-height: 1.46;
}
.register-btn {
display: block;
width: 164px;
height: 39px;
text-decoration: none;
background: url(../img/register-btn.png) repeat-x;
text-align: center;
font-family: Helvetica;
font-weight: bold;
margin-top: 27px;
font-size: 22px;
color: #FFF;
padding-top: 4px;
-webkit-box-shadow: 0px 0px 1px 1px #2e2e2e;
box-shadow: 0px 0px 2px 2px #2e2e2e;
}
#featured img {
margin-top: 6px;
margin-bottom: 2px;
}
/* ==========================================================================
MAIN STYLES
========================================================================== */
#features {
background: #ff5423;
overflow: hidden;
}
#features h3 {
line-height: 1.15;
color: #FFF;
font-family: Helvetica;
padding-top: 24px;
margin-bottom: 13px;
/*font-size: 26px;*/
font-size: 25px;
}
.features-left {
width: 447px;
float: left;
margin-right: 62px;
}
.features-right {
width: 472px;
float: left;
}
.features-right ul {
margin-left: 15px;
}
.features-right ul li {
line-height: 1.76;
color: #ffc3b2;
font-size: 14px;
padding-left: 2px;
}
.features-right ul li span {
font-size: 17px;
color: #fefefe;
position: relative;
top: 2px;
}
.more-features {
display: block;
width: 144px;
height: 28px;
color: #fb3800;
font-family: Helvetica;
/*font-size: 17px;*/
font-size: 16px;
font-weight: bold;
text-align: center;
padding-top: 4px;
text-decoration: none;
background: url(../img/more-features.png) repeat-x;
margin-top: 38px;
margin-bottom: 23px;
}
#client-list {
border-top: 4px solid #a6a6a6;
border-bottom: 4px solid #c6c6c6;
padding-bottom: 7px;
}
#client-list .col-full {
width: 1080px;
}
#client-list h4 {
color: #4d4d4d;
/*font-size: 18px;*/
font-size: 17px;
margin-top: 39px;
}
#client-list .more-clients {
float: left;
text-decoration: none;
font-size: 15px;
color: #ff5423;
}
#client-list img {
margin-left: 90px;
margin-top: -44px;
}
#main {
clear: both;
background: url(../img/main-gd.png) repeat;
}
.col-446 {
width: 446px;
float: left;
margin-right: 55px;
}
.col-476 {
width: 476px;
float: left;
}
.col-476 p {
margin-right: 25px;
}
#main h3 {
font-family: Helvetica;
/*font-size: 28px;*/
font-size: 27px;
color: #535353;
line-height: 1.07;
margin-top: 30px;
margin-bottom: 14px;
}
#main p {
font-size: 14px;
line-height: 1.64;
margin-bottom: 21px;
}
.site-features {
margin-top: 32px;
float: left;
}
.site-features li {
list-style: none;
float: left;
margin-right: 35px;
}
li.sf-last {margin-right: 0;}
.site-features li a {
}
.join-box {
}
.join-btn {
}
.join-box p {
}
/* ==========================================================================
FOOTER STYLES
========================================================================== */
h4 a span {
display: none;
}
#footer {
clear: both;
}
I think the best way to solve this is to add a minimum width to your body. This way when the viewport is too narrow to show all your content, a horizontal scrollbar will allow the user to access the entire page. By the looks of your content, min-width: 1100px; would be just about right.