Convert Horizontal Data List to Vertical- Media Queries, CSS - html

Please help to convert the below markup to be responsive across various screens using media queries, also please feel free to update the styles for the mark up where ever required:
Outstanding concerns with the below code are:
Code is not responsive
Styles break specially with in the date and time section of the
markup. Specifically, these css classes break across the screen
.downtime-styles & .date-container & .date-range & .date-month &
.date-time & .date-day classes specified below in the CSS
.downtime-styles{
text-align: center;
padding-bottom: 30px;
color: #007599;
font-family: Univers LT W01_55 Roman1475956,Arial,serif;
}
.date-container {
display: inline-block;
text-align: center;
color: #007599;
font-family: Univers LT W01_55 Roman1475956,Arial,serif;
}
.date-range {
height: 100%;
display: flex;
padding-left: 15px;
-webkit-box-pack: center;
justify-content: left;
-webkit-box-align: center;
align-items: center;
}
.date-month {
width: 100%;
font-size: 14px;
text-transform: uppercase;
padding-top: 30px;
margin: 0;
}
.date-time {
width: 100%;
font-size: 14px;
text-transform: uppercase;
padding-top: 0px;
margin: 0;
}
.date-day {
font-size: 24px;
padding-bottom: 0px;
margin-bottom: 0;
}
.div-div {
padding-top: 20px;
padding-left: 40px;
font-size: 100%;
font: inherit;
}
.main-div{
position: relative;
margin-top: 10px;
display: flex;
margin-right: 0px;
margin-left: 0px;
height: 125px;
border: 1px solid #A9A9A9;
border-radius: 12px;
overflow: hidden;
background-color: #f8f8f8;
}
.main-div-summary{
position: relative;
margin-top: 10px;
margin-right: 0px;
margin-left: 0px;
height: 125px;
border: 1px solid #A9A9A9;
border-radius: 12px;
background-color: #f8f8f8;
}
.main-box{
background-color: #2cbc85;
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 30px;
}
.p-box{
transform-origin: 0 50%;
position: absolute;
font-weight: bold;
top: 0;
bottom: 0;
height: 30px;
line-height: 30px;
margin: auto;
transform: rotate(-90deg) translate(-50%,50%);
color: black;
text-transform: uppercase;
font-size: 16px;
font-family: Univers LT W01_65 Bold1475968,Arial,serif;
}
.title-class{
font-size: 20px;
}
.pipeline-item-section{
height: 100%;
padding-top: 15px;
padding-left: 70px;
padding-bottom: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
color: #000f2b;
font-family: Univers LT W01_45 Light1475944,Arial,serif;
}
.light-font{
font-weight: normal;
margin: 0px;
font-weight: 100;
font-family: Arial;
}
<div class="row main-div">`enter code here`
<div class="main-box">
<p class="p-box"><span>COMPLETE</span></p>
</div>
<div class="col-xs-3 text-right pipeline-item-section">
<p class="title-class"><span>TITLE OF EVENT</span></p>
</div>
<div class="col-xs-3 pipeline-item-section">
<p class="title-class"><a class="hyperlink-
text">XYZLMNOP</a></p>
<div>
<p class="light-font"><span>Name: </span>ABC</p>
<p class="light-font"><span>Type: </span>XYZ</p>
</div>
</div>
<div class="col-xs-3 pipeline-item-section">
<p class="title-class">Users Notified: <a
class="hyperlink-text">4</a></p>
<div>
<p class="light-font"><span>Impacted Count: </span>
<span>3</span></p>
<p class="light-font"><span>Impacted List: </span>
<span>1</span></p>
</div>
</div>
<div class="col-xs-3 date-range">
<div class="div-div">
<div class="date-container">
<p class="date-month">JUNE</p>
<p class="date-day">2</p>
<p class="date-time">10 AM</p>
</div>
<i class="fa fa-long-arrow-right"></i>
<div class="date-container">
<p class="date-month">JUNE</p>
<p class="date-day">3</p>
<p class="date-time">12 PM</p>
</div>
<div class="downtime-styles"><span>Downtime:
</span>2 hours</div>
</div>
<div class="button-styles btn-group flex-btn-group-
container">
<button type="submit" replaceUrl="true">
<span class="fa fa-remove"></span>
</button>
<button type="submit" replaceUrl="true">
<span class="fa fa-pencil"></span>
</button>
</div>
</div>
</div>

Related

Put 2 buttons div on my banner and center

I would like to put 2 buttons div (register and login) on my banner and center. However I think that I already have a problem with my blocks on my html ??
Here is an overview of my website in below.
screenshot:
My first problem is that I don't can to use the margin-left or margin-right to move my button "register" or "login" for center.
My problem comes perhaps from code HTML, Is it a problem with my blocks ?
Here is my code HTML
<div class="my-banner">
<img class="banner" src="images/slider.jpg"/>
<div class="transparent"></div>
<img class="picture-logo" src="images/logo.png"/>
<div class="container">
<div class="myButtonRegister">REGISTER</div>
<div class="myButtonLogin">LOGIN</div>
<div class="topnav">
<a class="active" href="index.php">HOME</a>
ABOUT US
INVESTEMENT PLAN
NEWS
FAQS
RULES
CONTACT US
</div>
</div>
</div>
Here is my code CSS
.myButtonRegister{
margin-top: 342px;
float: left;
background-color: #C22312;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.myButtonRegister a {
color: #f2f2f2;
text-decoration: none;
}
.myButtonLogin{
margin-top: 342px;
float: left;
background-color: black;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
Do you have an idea plase ?
Just add a father box to your buttons and use flex to align your buttons. Here is an example:
.container {
height: 200px;
width: 100%;
background: #eee;
}
.container .subcontainer {
display: flex;
height: 100%;
align-items: center;
justify-content: center;
}
<div class="container">
<div class="subcontainer">
<button>Login</button>
<button>Register</button>
</div>
<!--NAV-->
</div>
Try following code for good design and set maximum height & width image in banner no issues create for this type of design this is the right way.
.myButtonRegister{
float: left;
background-color: #C22312;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.myButtonRegister a {
color: #f2f2f2;
text-decoration: none;
}
.myButtonLogin{
float: left;
background-color: black;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.button-action {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
-moz-transform: translate(-50%,-50%);
-ms-transform: translate(-50%,-50%);
}
<div class="my-banner">
<div class="banner-image">
<img class="banner" src="images/slider.jpg"/>
<div class="button-action">
<div class="myButtonRegister">REGISTER</div>
<div class="myButtonLogin">LOGIN</div>
</div>
</div>
<div class="transparent"></div>
<img class="picture-logo" src="images/logo.png"/>
<div class="container">
<div class="topnav">
<a class="active" href="index.php">HOME</a>
ABOUT US
INVESTEMENT PLAN
NEWS
FAQS
RULES
CONTACT US
</div>
</div>
</div>
Using position:absolute remove margin-top and give parent div to height and position:relative
.my-banner{
position:relative;
height: 450px;
}
.btnBox{
position: absolute;
left: 0px;
right: 0px;
top: 0px;
margin: auto;
bottom: 0px;
height: 85px;
width: 336px;
}
.myButtonRegister{
float: left;
background-color: #C22312;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
.myButtonRegister a {
color: #f2f2f2;
text-decoration: none;
}
.myButtonLogin{
float: left;
background-color: black;
color: white;
height: 48px;
width: 168px;
text-align: center;
color: white;
font-family: 'Pridi', serif;
font-size: 26px;
padding-top: 10px;
word-spacing: 0px;
}
<div class="my-banner">
<img class="banner" src="images/slider.jpg"/>
<div class="transparent"></div>
<img class="picture-logo" src="images/logo.png"/>
<div class="container">
<div class="btnBox">
<div class="myButtonRegister">REGISTER</div>
<div class="myButtonLogin">LOGIN</div>
</div>
<div class="topnav">
<a class="active" href="index.php">HOME</a>
ABOUT US
INVESTEMENT PLAN
NEWS
FAQS
RULES
CONTACT US
</div>
</div>
</div>

Inexplicable gap in between my divs

I am trying to replicate the BBC News site and I have this weird styling problem.
Here is the image.
I always get this gap in between two of my divs.
Here is the code I used. Not sure how I am supposed to go about getting rid of that space. tried setting margin and padding to 0 but that didn't work.
Here is the code:
body{
margin: 0;
padding: 0;
font-family: Helvetica, Arial, sans-serif;
}
#topbar{
height: 40px;
width: 1000px;
margin: 0 auto;
background-color: #FFFFFF;
}
#logo{
float: left;
margin-top: 8px;
margin-right: 8px;
}
.topbarsections{
float:left;
border-left: 1px #CCCCCC solid;
height: 100%;
}
#signin-image{
float: left;
width: 30px;
margin-top: 7px;
margin-left: 8px;
}
#signin-text{
float: left;
font-weight: bold;
font-size: 90%;
color: #333333;
position: relative;
top: 13px;
padding-right: 80px;
}
.topbar-menu{
float: left;
font-weight: bold;
color: #333333;
font-size: 90%;
padding: 13px 15px 0 15px;
height: 27px;
}
#more-arrow{
height: 13px;
margin-left: 15px;
}
#search-box{
background-color: #E4E4E4;
margin: 8px 0 0 10px;
border: none;
font-weight: bold;
font-size: 14px;
padding: 5px;
width: 140px;
float: left
}
#magnifying-glass{
margin-top: 8px;
height: 26px;
}
.clear{
margin: 0;
padding: 0;
}
#news-bar{
background-color: #BB1919;
width: 100%;
height: 70px;
}
#inner-news-bar{
background-color: #BB1919;
margin: 0 auto;
width: 1200px;
height: 70px;
}
#news-bar h1{
color: white;
margin: 0;
padding: 10px;
font-weight: normal;
font-size: 45px;
}
#menu-bar{
background-color: #A91717;
width: 100%;
height: 35px;
}
#inner-menu-bar{
background-color: #A91717;
width: 1200px;
height: 35px;
margin: 0 auto;
}
.menu-bar-sections{
float: left;
border-right: 1px solid #BB4545;
padding-left: 10px;
padding-right:8px;
position: relative;
top: -5px;
}
.menu-bar-sections a{
float:left;
color: white;
text-decoration: none;
}
.menu-bar-sections a:hover{
text-decoration: underline;
}
#menu-bar-more-section{
border-right: none !important;
}
#down-arrow{
float: left;
height: 13px;
position: relative;
top: 2px;
margin-left: 2px;
}
#page-container{
width: 1200px;
margin: 0 auto;
}
h2{
}
<body>
<div id="topbar">
<img id="logo" src="images/bbclogo.png">
<div id="signin-div" class="topbarsections">
<img src="images/singin.PNG" id="signin-image">
<span id="signin-text">Sign in</span>
</div>
<div class="topbarsections topbar-menu">
News
</div>
<div class="topbarsections topbar-menu">
Sports
</div>
<div class="topbarsections topbar-menu">
Weather
</div>
<div class="topbarsections topbar-menu">
Shop
</div>
<div class="topbarsections topbar-menu">
Earth
</div>
<div class="topbarsections topbar-menu">
Travel
</div>
<div class="topbarsections topbar-menu">
More
<img id="more-arrow"src="images/more-arrow.PNG">
</div>
<div class="topbarsections">
<input id="search-box" type="text" placeholder="Search">
<input type="image" id="magnifying-glass" src="images/glass.PNG">
</div>
</div>
<div class="clear"></div>
<div id="news-bar">
<div id="inner-news-bar">
<h1>NEWS</h1>
</div>
</div>
<div class="clear"></div>
<div id="menu-bar">
<div id="inner-menu-bar">
<p class="menu-bar-sections">Home</p>
<p class="menu-bar-sections">Video</p>
<p class="menu-bar-sections">World</p>
<p class="menu-bar-sections">US & Canada</p>
<p class="menu-bar-sections">UK</p>
<p class="menu-bar-sections">Business</p>
<p class="menu-bar-sections">Tech</p>
<p class="menu-bar-sections">Science</p>
<p class="menu-bar-sections">Stories</p>
<p class="menu-bar-sections">Entertainment & Arts</p>
<p class="menu-bar-sections">Health</p>
<p class="menu-bar-sections" id="menu-bar-more-section">More<img src="images/down-arrow.PNG" id="down-arrow"></p>
</div>
</div>
<div class="clear"></div>
<div id="page-container">
<div id="main-article">
<h2>Technology</h2>
</div>
</div>
</body>
If by "gap" you mean the space above the heading "Technology", #Olivier Krull is right: that's the default margin of the h2 header.
You can simply add this CSS rule to set it to zero:
#main-article > h2:first-child {
margin-top: 0;
}

Panels are not lining up

I am trying to line up three panels as seen in the screenshot but everything I've tried hasn't fixed the problem. I've tried reducing the panels widths to 30% and floating them, and I have used display:inline and still the problem persists. Any Ideas what is causing this ?
Problem Page
HTML:
<div class="row" id="hscontent">
<div class="small-12 medium-4 large-4 columns" id="skinny">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-A.png" />
</div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead"><h5 class="taba">Our virtual tour !</h5></div>
</br>
<p class="tabpara">Take a virtual tour of the Horseshoe Bar and Restaurant and see for
yourself its unique, alluring and enchanting interior and atmosphere . It’s rich history and
heritage combines in a warm and charming blend that mixes traditional Irish decor with ornate
old World elegance.</p>
</div>
</div>
<div class="small-12 medium-4 large-4 columns" id="skinny">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-B.png" />
</div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead"><h5 class="tabb">See our menus</h5></div>
</br>
<div class="hstabs">
<span class="tabby">Bar Menu</span>
<span class="tabby">Evening Menu</span>
<span class="tabby">Wine Menu</span>
<span class="tabby">Whiskey Menu</span>
<span class="tabby">Gin Menu</span>
</div>
</div>
</div>
<div class="small-12 medium-4 large-4 columns" id="skinny">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-C.png" /></div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead"><h5 class="taba">Our take on trad</h5></div>
</br>
<p class="tabpara">At one of the Horseshoe’s music sessions you’ll see and hear all of the
splendour that is the Irish traditional music session. A local gathering of talented, and soulful
musicians spinning tunes that capture all of the joy, sorrow, humour and heart of a Irish
traditional music set. </p>
</div>
</div>
</div>
</body>
</html>
RELEVANT CSS:
#charset "utf-8";
/* CSS Document */
body {
width:1200px;
}
.row {
max-width: 1200px;
}
#hsback {
width: 1200px;
height: 1320px;
background-image: url('../Images/HSBACK-WIDE.jpg');
background-repeat: no-repeat;
background-position: center center;
padding-right: auto;
padding-left: auto;
}
#hscontent {
margin-top:-640px;
}
#skinny {
width:30%;
float:left;
display:inline;
}
.panela {
display:inline;
}
panelimg {
width: 100%;
}
hr.style1{
border-top: 1px solid #000;
width: 80%;
text-align: center;
box-shadow: none;
}
.panel {
margin-right: auto;
margin-left: auto;
background-color: #2b4e24;
width: 87%;
overflow:hidden;
box-shadow: 7px 7px 5px #000000;
}
.panela img {
overflow:visible;
margin-right: auto;
margin-left: auto;
width: 100%;
}
.panela a {
margin-right: auto;
margin-left: auto;
text-align:center;
}
.taba {
color: #fff;
line-height: 1.0;
font-family: 'Dancing Script', cursive;
font-weight:400;
font-size: 2.1rem;
margin-top:0.5rem;
text-align:center;
width:98%;
border-bottom: 1px Solid #FFFFFF;
padding-bottom: 0.3rem;
}
.tabb {
color: #fff;
line-height: 1.0;
font-family: 'Dancing Script', cursive;
font-weight:400;
font-size: 2.1rem;
margin-top:0.5rem;
text-align:center;
width:98%;
border-bottom: 1px Solid #FFFFFF ;
padding-bottom: 0.3rem;
}
.tabhead {
width: 80%;
margin-right: auto;
margin-left: auto;
}
.tabpara {
color: #fff;
font-family: 'EB Garamond', serif;
font-size: 1.2rem;
line-height: 1.3;
text-align:center;
margin-top: -70px;
word-spacing: -2;
margin-right: auto;
margin-left: auto;
padding:3px;
width:98%;
}
.tabcolor {
background-color: #2b4e24;
}
.hstabs {
margin-top: -3.7rem;
padding-bottom: 0.90rem;
}
.tabby {
color: #fff;
font-family: 'EB Garamond', serif;
font-size: 1.7rem;
line-height: 1.2;
text-align:center;
text-transform: uppercase;
padding-top: 0.15rem;
padding-bottom: 0.15rem;
display:block;
}
.tabby {
text-align:center;
}
A few issues that could be contributing:
You're using invalid tags - </br> is not a tag. I assume you meant <br/>
The HTML structure is invalid. There are incorrectly nested tags and missing closing tags. Please put your HTML through a parser to make sure the HTML is correct. I have made some corrections below.
body {
width: 1200px;
}
.row {
max-width: 1200px;
}
#hsback {
width: 1200px;
height: 1320px;
background-image: url('../Images/HSBACK-WIDE.jpg');
background-repeat: no-repeat;
background-position: center center;
padding-right: auto;
padding-left: auto;
}
#hscontent {
margin-top: -640px;
}
.top-bar {
padding: 2.0rem;
background-image: url('../Images/Menuback-TRANS.png');
background-repeat: no-repeat;
background-position: center center;
background-size: contain;
background-color: transparent;
}
.top-bar li {
padding-top: 3.0rem;
padding-bottom: 2.0rem;
padding-right: 1.5rem;
font-size: 1.7rem;
color: #FFF;
font-family: 'Lora', serif;
text-decoration: none;
list-style-type: none;
}
.top-bar li {
float: left;
}
/* Make CSS more specific */
.top-bar a {
text-decoration: none;
color: #FFF;
float: left;
}
.menulogo img {
float: left;
}
#skinny {
width: 30%;
float: left;
display: inline;
}
.panela {
display: inline;
}
panelimg {
width: 100%;
}
hr.style1 {
border-top: 1px solid #000;
width: 80%;
text-align: center;
box-shadow: none;
}
.panel {
margin-right: auto;
margin-left: auto;
background-color: #2b4e24;
width: 87%;
overflow: hidden;
box-shadow: 7px 7px 5px #000000;
}
.panela img {
overflow: visible;
margin-right: auto;
margin-left: auto;
width: 100%;
}
.panela a {
margin-right: auto;
margin-left: auto;
text-align: center;
}
.taba {
color: #fff;
line-height: 1.0;
font-family: 'Dancing Script', cursive;
font-weight: 400;
font-size: 2.1rem;
margin-top: 0.5rem;
text-align: center;
width: 98%;
border-bottom: 1px Solid #FFFFFF;
padding-bottom: 0.3rem;
}
.tabb {
color: #fff;
line-height: 1.0;
font-family: 'Dancing Script', cursive;
font-weight: 400;
font-size: 2.1rem;
margin-top: 0.5rem;
text-align: center;
width: 98%;
border-bottom: 1px Solid #FFFFFF;
padding-bottom: 0.3rem;
}
.tabhead {
width: 80%;
margin-right: auto;
margin-left: auto;
}
.tabpara {
color: #fff;
font-family: 'EB Garamond', serif;
font-size: 1.2rem;
line-height: 1.3;
text-align: center;
margin-top: -70px;
word-spacing: -2;
margin-right: auto;
margin-left: auto;
padding: 3px;
width: 98%;
}
.tabcolor {
background-color: #2b4e24;
}
.hstabs {
margin-top: -3.7rem;
padding-bottom: 0.90rem;
}
.tabby {
color: #fff;
font-family: 'EB Garamond', serif;
font-size: 1.7rem;
line-height: 1.2;
text-align: center;
text-transform: uppercase;
padding-top: 0.15rem;
padding-bottom: 0.15rem;
display: block;
}
.tabby {
text-align: center;
}
#whiskeyback {
background: url("../Images/NU-WHISKEY-BACK.jpg")!important;
background-size: cover;
width: 100%;
padding: 1.0rem;
}
.whiskey {
font-family: 'EB Garamond', serif;
font-size: 2.8rem;
line-height: 3.0rem;
color: #e8d789;
text-align: center;
text-shadow: 0 0 14px #e8d789;
padding: 0.8rem;
}
.whiskeytitle {
padding-top: 0.5rem;
padding-right: auto;
padding-bottom: 1.5rem;
padding-left: auto;
}
.whiskeyparabig {
color: #f9f8fd;
font-family: 'Lora', serif;
font-size: 1.5rem;
font-weight: 300;
text-transform: uppercase;
line-height: 1.4rem;
text-align: center;
padding-right: 2.5rem;
padding-left: 2.5rem;
margin-top: -1.5rem;
}
.whiskeypara {
color: #f9f8fd;
font-family: 'Lora', serif;
font-size: 1.2rem;
font-weight: 300;
line-height: 1.5rem;
text-align: center;
padding-top: 0.45rem;
padding-bottom: 4.2rem;
padding-right: 3.2rem;
padding-left: 3.6rem;
margin-top: -1.5rem;
}
a {
text-decoration: none;
}
/* Make CSS more specific */
/*img {
display:inline;
}*/
#foota {
background-image: url('../Images/FOOTER-BACK-BIG.jpg');
background-size: contain;
width: 100%;
}
#footmenu {
padding-top: 2.0rem;
padding-bottom: 2.0rem;
}
#footmenua {
padding-top: 1.0rem;
padding-bottom: 2.0rem;
margin-left: 0.1rem;
margin-top: -3.8rem;
}
.footlink {
font-size: 1.5rem;
padding: 1.0rem;
margin-left: 1.0rem;
color: #f9f8fd;
font-family: 'Lora', serif;
}
.footlinka {
font-size: 1.5rem;
padding: 1.0rem;
margin-left: 1.0rem;
color: #f9f8fd;
font-family: 'Lora', serif;
}
.footpic {
margin-top: -5.0rem;
padding-right: 1.0rem;
}
#floatfoot {
display: inline;
}
#floatfoot img {
margin-top: -1.0rem;
}
.footlogo {
margin-top: 0.5rem;
margin-left: 0.8rem;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.1/css/foundation.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/foundation/6.4.1/js/foundation.min.js"></script>
<header>
<div class="row" id="hsback">
<div class="top-bar">
<ul>
<li>Menus</li>
<li>Special Offers</li>
<li>Testimonials</li>
<li>Rooms</li>
</ul>
<img class="menulogo" src="Images/VINTAGE-SIGN-3A2.png" />
</div>
</div>
</header>
<div class="row" id="hscontent">
<div class="small-12 medium-4 large-4 columns">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-A.png" />
</div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead">
<h5 class="taba">Our virtual tour !</h5>
</div>
<br/>
<p class="tabpara">Take a virtual tour of the Horseshoe Bar and Restaurant and see for yourself its unique, alluring and enchanting interior and atmosphere . It’s rich history and heritage combines in a warm and charming blend that mixes traditional Irish decor with
ornate old World elegance.</p>
</div>
</div>
<div class="small-12 medium-4 large-4 columns" id="skinny">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-B.png" />
</div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead">
<h5 class="tabb">See our menus</h5>
</div>
<br/>
<div class="hstabs">
<span class="tabby">Bar Menu</span>
<span class="tabby">Evening Menu</span>
<span class="tabby">Wine Menu</span>
<span class="tabby">Whiskey Menu</span>
<span class="tabby">Gin Menu</span>
</div>
</div>
</div>
<div class="small-12 medium-4 large-4 columns">
<div class="panela">
<img class="panelimg" src="Images/HS-TAB-TOP-C.png" />
</div>
<div class="panel" background-color:#2b4e24;>
<div class="tabhead">
<h5 class="taba">Our take on trad</h5>
</div>
<br/>
<p class="tabpara">At one of the Horseshoe’s music sessions you’ll see and hear all of the splendour that is the Irish traditional music session. A local gathering of talented, and soulful musicians spinning tunes that capture all of the joy, sorrow, humour and heart
of a Irish traditional music set. </p>
</div>
</div>
</div>
<div class="row" id="whiskeyback">
<div class="small-12 medium-6 medium-offset-6 large-5 large-offset-7 columns">
<img class="whiskeytitle" src="Images/WHISKEY-GOLD-3.png" />
<p class="whiskeyparabig">Lorem ipsum dolor sit</p>
<p class="whiskeypara">amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Lorem ipsum dolor sit amet. </p>
</div>
</div>
<footer>
<div class="row" id="foota">
<div class="row" id="footmenu">
<div class="small-12 medium-12 large-12 columns">
<img class="footlogo" src="Images/BEHAN'S-FOOTER-LOGO-GOLD-SMALL.png" />
</div>
</div>
<div class="row" id="footmenua">
<div class="small-12 medium-6 large-6 columns">
<span class="footlink ">Our Menus</span>
<a class="footlink " href="default.asp ">Testimonials</a>
<a class="footlink " href="default.asp ">Rooms</a>
<be/>
<a class="footlinka " href="default.asp ">Take a Tour</a>
<a class="footlinka " href="default.asp ">Our Sessions</a>
</div>
<div class="small-12 medium-3 medium-offset-3 large-3 large-offset-3 columns" id="floatfoot">
<img class="footpic" src="Images/Trip-Advisor-Smallest.png" />
<img class="footpic" src="Images/facebook-Smallest.png" />
</div>
</div>
</div>
</footer>

How would I fix #block_two div in place? I've tried using the position property but that didn't work

I've tried position referencing to fix the position of "#block_two" but that doesn't seem to work. The div disappears when I use fix and absolute isn't better. I also tried changing the z-index of #block_two but to no avail.
html {
overflow: scroll;
}
body {
height: 100%;
width: 100%;
max-width: 100%;
overflow-y: auto;
overflow-x: hidden;
margin: 0;
}
div#static_nav{
font-family: Arial, sans-serif;
padding-top: 10px;
text-align: right;
width: 100%;
height: 2em;
background-color: #3A3D3F;
position:fixed;
opacity: .90;
color: red;
vertical-align: middle;
}
div#static_nav a{
color: white;
text-decoration: none;
padding-right: 20px;
}
.navbar {
padding-right: 20px;
padding-top: 2px;
}
div#container {
margin-top: 10px
height: 10vh
width: 100%;
background-color: #16BA81;
color:;
}
div#block_two{
background-color: ;
padding-top: 10px;
height: 100vh;
background-image: url(/New_Website/sample_image.png);
background-size: cover;
}
div#block_three{
padding-top: 10px;
height: 100vh;
background-color: #E4E2E2;
}
div#column-left{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#column-right{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#column-center{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#block_four{
padding: 10px;
height: 100vh;
background-color: #E4E2E2;
}
div#end_block{
padding: 10px;
background-color: #F2F2F2;
height: 50vh;
text-align: center;
}
.area_content{
padding-left: 20px;
padding-right: 20px;
font-size: 20px;
color: #3A3D3F;
margin-left: auto;
margin-right: auto;
display: inline-block;
text-align: left;
}
.eb_header{
font-size: 30px;
font-family: Helvetica, sans-serif;
color: #3A3D3F;
}
.b3_pics{
max-width: inherit;
height: 50%;
}
.b4{
padding-top: 60px;
max-width: inherit;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
color: #3A3D3F;
}
.b3_hd{
color: #3A3D3F;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container">
<header>
<div id="static_nav">
<nav class='navbar'>
HOME
ABOUT
PEOPLE
CONTACT
LOG IN
</nav>
</div>
</header>
<div id="block_two">
</div>
<div id="block_three">
<div id="column-left">
<header class="b3_hd">
Hospitality
</header>
<div class="b3_pics">
<div id="pic1">
</div>
</div>
<p class="area_content">
</p>
</div>
<div id="column-center">
<header class="b3_hd">
COLUMN CENTER
</header>
<div class="b3_pics">
<div id="pic2">
</div>
</div>
<p class="area_content">
</p>
</div>
<div id="column-right">
<header class="b3_hd">
COLUMN RIGHT
</header>
<div class="b3_pics">
<div id="pic3">
</div>
</div>
<p class="area_content">
</p>
</div>
</div>
<div id="block_four">
<header class="b4"> PEOPLE </header>
</div>
<div id="end_block">
<header class="eb_header">
CONTACT
</header>
</div>
</div>
Use position:fixed; and a negative z-index
html {
overflow: scroll;
}
body {
height: 100%;
width: 100%;
max-width: 100%;
overflow-y: auto;
overflow-x: hidden;
margin: 0;
padding:100vh 0 0 0;
}
div#static_nav{
font-family: Arial, sans-serif;
padding-top: 10px;
text-align: right;
width: 100%;
height: 2em;
background-color: #3A3D3F;
position:fixed;
opacity: .90;
color: red;
vertical-align: middle;
top:0;
z-index:999;
}
div#static_nav a{
color: white;
text-decoration: none;
padding-right: 20px;
}
.navbar {
padding-right: 20px;
padding-top: 2px;
}
div#container {
margin-top: 10px
height: 10vh
width: 100%;
background-color: #16BA81;
color:;
}
div#block_two{
background-color: ;
padding-top: 10px;
height: 100vh;
background-image: url('http://www.chinabuddhismencyclopedia.com/en/images/thumb/b/b8/Nature.jpg/240px-Nature.jpg');
background-size: cover;
position:fixed;
top:2.5em;
z-index:-1;
width:100%;
}
div#block_three{
padding-top: 10px;
height: 100vh;
background-color: #E4E2E2;
}
div#column-left{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#column-right{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#column-center{
padding-top: 60px;
float: left;
width: 33%;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
}
div#block_four{
padding: 10px;
height: 100vh;
background-color: #E4E2E2;
}
div#end_block{
padding: 10px;
background-color: #F2F2F2;
height: 50vh;
text-align: center;
}
.area_content{
padding-left: 20px;
padding-right: 20px;
font-size: 20px;
color: #3A3D3F;
margin-left: auto;
margin-right: auto;
display: inline-block;
text-align: left;
}
.eb_header{
font-size: 30px;
font-family: Helvetica, sans-serif;
color: #3A3D3F;
}
.b3_pics{
max-width: inherit;
height: 50%;
}
.b4{
padding-top: 60px;
max-width: inherit;
text-align: center;
font-size: 30px;
font-family: Helvetica, sans-serif;
color: #3A3D3F;
}
.b3_hd{
color: #3A3D3F;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="container">
<header>
<div id="static_nav">
<nav class='navbar'>
HOME
ABOUT
PEOPLE
CONTACT
LOG IN
</nav>
</div>
</header>
<div id="block_two">
</div>
<div id="block_three">
<div id="column-left">
<header class="b3_hd">
Hospitality
</header>
<div class="b3_pics">
<div id="pic1">
</div>
</div>
<p class="area_content">
</p>
</div>
<div id="column-center">
<header class="b3_hd">
COLUMN CENTER
</header>
<div class="b3_pics">
<div id="pic2">
</div>
</div>
<p class="area_content">
</p>
</div>
<div id="column-right">
<header class="b3_hd">
COLUMN RIGHT
</header>
<div class="b3_pics">
<div id="pic3">
</div>
</div>
<p class="area_content">
</p>
</div>
</div>
<div id="block_four">
<header class="b4"> PEOPLE </header>
</div>
<div id="end_block">
<header class="eb_header">
CONTACT
</header>
</div>
</div>
Instead of using position: fixed on the div I used background-attachment: fixed to hold the image in place and this .

How to give a fixed size to fontawesome icons

I created a footer and used fontawesome icons with border.
On the following code I display the items and intend to have them as the picture shows
I was nearly there until I found that when I resize the screen, the icons also shrink like the photo show
Here my styling:
$footer: #464646;
.footer-font-awesome{
font-family: 'FontAwesome';
display: inline-block;
width: 40px;
height: 40px;
border: 1px solid white;
border-radius: 50%;
line-height: 40px;
text-align: center;
font-size: 18px;
text-indent: 0;
}
footer#colophon{
background-color: $footer;
color: white;
padding: 20px 40px;
ul,li,p{
margin: 0;
}
.site-info{
.textwidget {
display: flex;
justify-content: center;
div.box{
display: flex;
width: 100%;
max-width: 25%;
align-items: center;
p{
padding-left:8px;
}
}
.email,
.phone,
.address{
padding-right: 40px;
}
.email{
&:before{
#extend .footer-font-awesome;
content: '\f003';
}
}
.phone{
&:before{
#extend .footer-font-awesome;
content: '\f095';
}
}
.back-top{
justify-content: center;
}
.address{
&:before{
#extend .footer-font-awesome;
content: '\f041';
}
}
}
}
}
Here my html structure:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<section id="black-studio-tinymce-33" class="widget widget_black_studio_tinymce">
<div class="textwidget">
<div class="box email">
<p>Email<br> <span class="unbold"><a>info#web2web.co.za</a></span></p>
</div>
<div class="box phone">
<p>Phone<br> <span class="unbold">021 823 8384</span></p>
</div>
<div class="box address">
<p>Address<br> <span class="unbold">Century City, Cape Town</span></p>
</div>
<div class="box back-top">
<p><span class="unbold"><a class="back-top">To the top</a></span></p>
</div>
</div>
</section>
</div><!-- .site-info -->
</footer>
How can I style my icons as the first pictures shows with no problem even when I resize?
Hope you can edit from my snippet
I would just set min-width on .footer-font-awesome
.footer-font-awesome{
font-family: 'FontAwesome';
display: inline-block;
width: 40px;
min-width: 40px; // This...
height: 40px;
border: 1px solid white;
border-radius: 50%;
line-height: 40px;
text-align: center;
font-size: 18px;
text-indent: 0;
}