Here is my css code:
.footer{
clear:both;
background:url('../img/footer-bg.jpg');
overflow: hidden;
}
.footer-left{
float:left;
width: 50%;
}
.footer-right{
float:right;
width:50%;
}
.footer-nav .list-1 {
font-size:13px;
font-weight:600;
text-align: center;
}
.footer-nav .list-2 {
font-size:12px;
font-weight:600;
text-align: center;
}
.footer-nav ul li{
display:inline;
padding:8px;
}
.copyright{
font-size:13px;
text-align: center;
}
Here is my JSfiddle link: http://jsfiddle.net/3jet0dfu/12/
May i know how to set background image to 100% attached with window screen.and the footer content need to display right of image.
Now i added <hr /> line for footer-left and footer-right at the top and bottom.
But it shows at the top only, Can anybody help me exact css style to fix this.
I need look like this http://s30.postimg.org/gvqtdrmqp/article_page4.jpg.
Thanks in advance.
add to css
header,section{
margin:0 auto;
width:939px;}
and edit body css like this
body{
font-family: Raleway, sans-serif;
}
this working page jsfiddle
remove the 2 and replace the following html and add the css
<div id="footer-holder">
<div class="footer-left">
<img src="http://s18.postimg.org/itr24b7s9/footer1.png" alt="footer-image" />
<div class="footer-content">
<p class="footer-title">.NET Training</p>
<p class="footer-pgf">Less of boring theory! Hands on programming is our training methodology! You'll love it.<p>
learn more
</div>
</div>
<div class="footer-right">
<img src="http://s18.postimg.org/gl8a98bah/footer2.png" alt="footer-image" />
<div class="footer-content">
<p class="footer-title">Shopify Expert at $20/hour</p>
<p class="footer-pgf">Unique custom made shopify theme and tweakss. Strat selling online with stunning eCommerce storefronts created using the Shopify CMS</p>
learn more
</div>
</div>
<div style="clear:both"></div>
</div>
#footer-holder{
-webkit-border-image:url(border.png) 30 30 round; /* Safari 3.1-5 */
-o-border-image:url(border.png) 30 30 round; /* Opera 11-12.1 */
border-image:url(border.png) 30 30 round;
border-left:none;
border-right:none;
width: 100%;
}
Related
I want to set up a full width slideshow based on the Design I've prepared. I'm building the page on the Unsemantic CSS framework as I was already familiar with 960 gridsystem (960.gs).
What I'm missing is how to write physically correct HTML & CSS. I don't want to build these unstable workarounded glued pages like most.
I've tried my best to build it but nothing seems to work the way it should. Here is a part of the page where a slideshow should appear.
However, it looks like this.
Here's the CCS:
<style>
.slide-wrapper{
background-color:black;
width:100%;
overflow:hidden;
}
.slide-item{
width:100%;
overflow:hidden;
color:white;
}
.slide-img-wrapper{
position:relative;
}
.slide-img{
width:100%;
float:left;
position:relative;
}
.slide-description{
position:absolute;
float:left;
text-align:center;
width: 100%;
margin-top:16%;
}
.description-wrapper{
}
</style>
<div id="slide-wrapper">
<div class="slide-item">
<img class="slide-img" src="../villas.praivit/img/lead.jpg" />
<div class="slide-description">
<p class="location">SWITZERLAND, CERN</p>
<h1>VILLA PANORAMA</h1>
<p class="details">Local Time <b>4:10 am</b>, Temperature <b>32F°</b></p>
<div class="button-1">VIEW VILLA</div>
</div>
</div>
</div>
Is this what you are looking for?
<div id="slide-wrapper">
<div class="slide-item">
<img class="slide-img" src="http://dreamatico.com/data_images/mountain/mountain-1.jpg" />
<div class="slide-description">
<p class="location">SWITZERLAND, CERN</p>
<h1>VILLA PANORAMA</h1>
<p class="details">Local Time <b>4:10 am</b>, Temperature <b>32F°</b></p>
<div class="button-1">VIEW VILLA</div>
</div>
</div>
</div>
.slide-wrapper{
background-color:black;
width:100%;
overflow:hidden;
}
.slide-item{
width:100%;
overflow:hidden;
color:white;
}
.slide-img-wrapper{
position:relative;
}
.slide-img{
width:100%;
float:left;
position:relative;
}
.slide-description{
position:absolute;
float:left;
text-align:center;
width: 100%;
margin-top:16%;
}
.description-wrapper{
}
.button-1{
display: inline-block;
background-color: #b8955d;
color: #fff;
box-sizing: border-box;
padding: 10px;
}
.button-1 a{
color: #fff;
text-decoration: none;
}
I'm trying to get the shoutbox on www.talkjesus.com (vBulletin forum) to float left while the verse of the day (orange) to float on the very right side of the shoutbox. I've tried so many variations but it's not working, I'm stuck. Your help appreciated.
The forumhome template code I'm using now is:
<div class="blockbody formcontrols floatcontainer">
<div id="wgo_onlineusers" class="wgo_subblock">
<h3 class="blocksubhead" style="background-color:#82BA1B; color: #fff !important; font-size: 22px; font-weight: 300">shoutbox</h3>
<div style="text-align: center; line-height: 0" class="blockrow">
<div><iframe frameborder="0" width="100%" height="200" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain1-439"" id="cboxmain1-439" style="border-bottom: 1px solid #e4e4e4;"></iframe></div>
<div style="position:relative"><iframe frameborder="0" width="350" height="70" src="http://www.cbox.ws/box/?boxid=439&boxtag=7868&sec=form&nme={vb:raw cboxnme}&nmekey={vb:raw cboxkey}&pic={vb:raw cboxav}&lnk={vb:raw cboxav}" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform1-439" id="cboxform1-439"></iframe></div>
</div>
</div>
</div>
<br />
<div class="blockbody formcontrols floatcontainer">
<div id="wgo_onlineusers" class="wgo_subblock">
<h3 class="blocksubhead" style="background-color:#E66B1B; color: #fff !important; font-size: 22px; font-weight: 300">verse of the day</h3>
<div>
<div style="font-size:16px; line-height:28px; padding:10px; color: #797979">
<script type="text/javascript" src="http://www.christnotes.org/syndicate.php?content=dbv&type=js2&tw=auto&tbg=ffffff&bw=0&bc=000000&ta=L&tc=43A6DF&tf=Open Sans&ts=14&ty=B&va=L&vc=43A6DF&vf=Open Sans&vs=12&tt=3&trn=NASB"></script>
</div>
</div>
</div>
</div>
relevant CSS code...
/* Auto-clearing of floats */
.floatcontainer:after,
.formcontrols .blockrow:after,
dl.stats:after {
content:".";
display:block;
height:0;
clear:both;
visibility:hidden;
}
.floatcontainer,
.formcontrols .blockrow,
dl.stats {
display:inline-block;
font-weight:normal;
}
/* IE-Mac hide \*/
* html .floatcontainer,
.formcontrols .blockrow,
dl.stats {
height:1%;
}
.floatcontainer,
.formcontrols .blockrow,
dl.stats {
display:block;
}
.blockrow {
padding:12px;
}
.blocksubhead {
padding:12px;
}
.blockhead_info, .blocksubhead_info {
float:right;
font-weight:normal;
}
Have you tried applying the float property to the .floatcontainer element?
.floatcontainer {
width: 50%;
float: left;
}
Setting the width property will be necessary here because the output of the script in the second .floatcontainer block adds a div element to the document which has a width of 100%. Take a look at the output here: http://goo.gl/Bw7iaD (see inline styles of first element). This makes the verse box span full-width unless it's parent container has a specified width.
Here is an example of the working code: http://cdpn.io/0dfce502ffdc99f54a159f7a563ed4fe
I have a top nav that extends across the page
Within that top nav I have various elements
two that must align left
one that must align right
The nav is fluid the elements are fixed widths
Do not want the elements to wrap when the browser window is minimized
Needs to work in IE6 on up due to high Chinese audience.
See example here:
http://jsfiddle.net/4SUwg/
<div id="header">
<div id="headerContent">
<div class="search-list"> Search List </div>
<div class="social-buttons"> Social </div>
<div class="signin"> Login Drop Down </div>
</div>
</div>
I would like the div elements within the nav to not wrap. I searched around on stack and could find answers that come close but nothing that completely addressed the issue. My need to have the div element aligned right complicates matters. Must work in all browsers, especially IE's.
Thanks all for your help in advance!!!
Use SPAN .. It's INLINE and not BLOCK ??
<div id="header">
<div id="headerContent">
<span class="search-list"> Search List </span>
<span class="social-buttons"> Social </span>
<span class="signin"> Login Drop Down </span>
</div>
</div>
And your CSS, remove floats
<style>
body {
margin:0;
padding:0;
}
#header {
background: #404040;
height: 35px;
color: white;
margin: 0 0 12px 0;
overflow-x:auto; overflow-y:hidden;
}
#headerContent {
height: 32px;
border:1px dashed #fff;
}
.search-list {
width:150px;
background:#039;
}
.social-buttons {
width:150px;
background:#060;
}
.signin {
width:200px;
background:#F00;
}
You want a fluid layout but the most important rule of a fluid layout is not to set a definite width of elements but you have set the width.
The CSS have a <style> tag, which is not required, probably you put it by mistake.
I have set the width of divs inside headerContent in percentage value. The CSS is
body {
margin:0;
padding:0;
}
#header {
background: #404040;
height: 35px;
color: white;
margin: 0 0 12px 0;
overflow-x:auto; overflow-y:hidden;
}
#headerContent {
height: 32px;
border:1px dashed #fff;
}
.search-list {
width:28%;
float:left;
background:#039;
}
.social-buttons {
width:28%;
float:left;
background:#060;
}
.signin {
width:28%;
float:right;
background:#F00;
}
Just changed the width value and on my browser it looked fine, better than the before version. Here's a fiddle http://jsfiddle.net/DeepakKamat/s52Hn/8/
I found a solution that works in all browsers, specifically IE6 on up since that was a requirement for this project. If you have something better that accomplishes the same thing please post! My sincere thanks to everyone who answered/helped.
<div id="header2">
<table id="headerContent2">
<tr>
<td id="left" valign="top">
<div id="leftWrapper">
<div class="search-list2">Search List</div>
<div class="social-buttons2">Social Buttons</div>
</div>
</td>
<td id="middle"> </td>
<td id="right" valign="top">
<div class="signin2">Login Drop Down</div>
</td>
</tr>
</table>
</div>
<style>
#header2 {
background: #404040;
height: 35px;
color: white;
margin: 0 0 12px 0;
}
#headerContent2 {
width:100%;
}
#headerContent2 td {
height: 32px;
padding:0;
margin:0;
}
.search-list2 {
width:150px;
float:left;
background:#039;
}
.social-buttons2 {
width:200px;
float:left;
background:#060;
}
.signin2 {
background:#F00;
float:right;
width:400px;
}
#leftWrapper {
width:400px;
}
#middle {
width:100%;
}
</style>
See Demo of it working here. Copy the code and try it out in all the IE's since JSfiddle does not work in all IE's.
http://jsfiddle.net/GtXKE/
I am trying to create a grid layout using tags and css. I need the grid system to hold four main blocks as portrayed in the image below. I have created a solution that works great in safari and chrome, but not so well in firefox as the titles overlap. Please see my code below, and maybe someone can see where I have gone wrong! I cant for the life of me find the problem.
HTML CODE:-
<div class="elements_wrapper">
<div id="element1">
<img class="align-image" src="img/image1"/>
<span class="element-title">Title</span>
<p class="element-explain">Main text goes here</p>
</div>
<div id="element2">
<img class="align-image" src="img/image2"/>
<span class="element-title">Title</span>
<p class="element-explain">Main text goes here</p>
</div>
<div id="element3">
<img class="align-image" src="img/image3"/>
<span class="element-title">Title</span>
<p class="element-explain">Main text goes here</p>
</div>
<div id="element4">
<img class="align-image" src="img/image4"/>
<span class="element-title">Title</span>
<p class="element-explain">Main text goes here</p>
</div>
</div>
CSS CODE:-
.elements_wrapper {
width:100%;
margin-left:-65px;
margin-top:110px;
padding-bottom:30px;
}
#element1{
position:absolute;
display:inline-block;
margin-left:30px;
padding-bottom:20px;
}
#element2 {
position:absolute;
display:inline-block;
margin-top:200px;
margin-left:30px;
padding-bottom:20px;
}
#element3 {
position:absolute;
display:inline-block;
margin-left:545px;
margin-top:200px;
padding-bottom:20px;
}
#element4 {
position:absolute;
display:inline-block;
margin-left:545px;
padding-bottom:20px;
}
.element-title {
font-family:helvetica, arial, serif;
color:black;
display:inline;
font-size:14pt;
font-weight:bold;
padding-top:15px;
}
.element-explain {
font-family:helvetica, arial, serif;
font-size:10pt;
float:left;
width:280px;
}
.align-image {
border: none;
float:left;
padding-right:15px;
}
My code works great in safari and chrome, but not that well in firefox, please help. Also, please let me know if the code I have already used is bad or needs changing to ensure cross browser compatibility. Thanks so much.
See the next example: http://jsfiddle.net/ZNSAX/2/
.element-explain {
font-family:helvetica, arial, serif;
font-size:10pt;
float:left;
width:280px;
}
Floating left here will cause this error. Firefox is a bit finicky with floating elements than Chrome and IE. Removing this should fix your problem.
Im working on a portfolio for uni and the background of my container / wrapper does not extend vertically enough in order for all its content to have a back ground color. I'll post code below, any help would be appreciated.
HTML
<body>
<section id="wrapper">
<header>
<hgroup class="title">
<h1>Matt Murphy</h1>
<p>Personal Portfolio | University of Leeds | BA New Media</p>
</hgroup>
</header>
<nav>
Home
About Matt
</nav>
<section id="modules">
<h2>Modules Studies To Date</h2>
<section id="year_1">
<h3>Year 1</h3>
<p>History of Communications</p>
<p>Academic Skills and Contemporary Issues</p>
<p>Interface Design</p>
<p>Design For New Media</p>
<p>Basic Camera and Editing</p>
<p>Animation For New Media</p>
</section>
<section id="year_2">
<h3>Year 2</h3>
<p>Dynamic Web Programming</p>
<p>Communications Research Methods</p>
<p>Working in New Media/p>
<p>Media Policy</p>
<p>New Media Narrative and Gaming</p>
<p>Visual Communications</p>
</section>
</section>
</section>
</body>
CSS
body{
color:#000;
background-image: url(images/canvas.png);
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
}
a:link {
text-decoration:none;
color:#000;
}
a:visited {
text-decoration:none;
color:#000;
}
a:hover {
text-decoration:none;
color:#000;
}
a:active {
text-decoration:none;
color:#000;
}
#wrapper {
background-color:#FFF;
padding:3%;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
display:block;
margin:auto;
width:60%;
margin-top:2%;
}
header {
text-align:right;
}
#modules {
width:100%;
display:block;
margin:auto;
}
#year_1 {
float:left;
}
#year_2 {
float:left;
}
To fix your problem you just need to add overflow: auto to #wrapper.
#wrapper {
background-color:#FFF;
padding:3%;
-webkit-border-radius: 25px;
-moz-border-radius: 25px;
border-radius: 25px;
display:block;
margin:auto;
width:60%;
margin-top:2%;
overflow: auto; /* add this line */
}
However, another issue is that you are using HTML5 elements and the HTML5 shiv but you have not used the HTML5 doctype:
<!DOCTYPE html>
I assume you are having problems in IE? You are missing a doctype declaration. If you add a transitional doctype as per the example on W3Schools below it should work.
HTML doctype declaration
Basically the css-property 'float' on the section#year is the bad guy here.
If I replace your sections with div's and add an extra div to clear block rendering it works:
http://jsfiddle.net/hoedinie/537sL/1/