Okay.
The Problem is kinda weird.
I'm trying to convert HTML page to PDF file and save it.
I'm using mPDF for this. However, CSS rendering isn't going as expected.
I'm not using CSS3. So, I don't think that this is the problem.
Here's a screen shot of how should it be :
PDF :
Thanks in advance.
HTML :
https://codepen.io/AKhaled47/pen/omRObM
CSS :
div.calendar{
margin:2pc auto;
padding:0px;
width:602px;
}
div.calendar div.box{
position:relative;
top:0px;
left:0px;
width:100%;
height:40px;
background-color:#890e4f;
border-radius: 5px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
div.calendar div.header{
line-height:40px;
vertical-align:middle;
position:absolute;
left:11px;
top:0px;
width:582px;
height:40px;
text-align:center;
}
div.calendar div.header a.prev,div.calendar div.header a.next{
position:absolute;
top:0px;
height: 17px;
display:block;
cursor:pointer;
text-decoration:none;
color:#FFF;
}
div.calendar div.header span.title{
color:#FFF;
font-size:18px;
}
div.calendar div.header a.prev{
left:0px;
}
div.calendar div.header a.next{
right:0px;
}
div.calendar div.box-content{
background: #FFF;
border:1px solid #890e4f;
border-top:none;
border-radius:5px;
border-top-left-radius:0;
border-top-right-radius:0;
}
div.calendar ul.label{
float:left;
margin: 0px;
padding: 0px;
margin-top:5px;
margin-left: 5px;
}
div.calendar ul.label li{
margin:0px;
padding:0px;
margin-right:5px;
float:left;
list-style-type:none;
width:80px;
height:40px;
line-height:40px;
vertical-align:middle;
text-align:center;
color:#000;
font-size: 15px;
background-color: transparent;
}
div.calendar ul.dates{
float:left;
margin: 0px;
padding: 0px;
margin-left: 5px;
margin-bottom: 5px;
}
div.calendar ul.dates li{
margin:0px;
padding:0px;
margin-right:5px;
margin-top: 5px;
line-height:80px;
vertical-align:middle;
float:left;
list-style-type:none;
width:80px;
height:80px;
font-size:25px;
background-color: #DDD;
color:#000;
text-align:center;
}
:focus{
outline:none;
}
div.clear{
clear:both;
}
Float elements are only partially supported in mPDF. For best results, use a HTML table (which is perfectly suitable for a calendar).
See documentation on floats: https://mpdf.github.io/what-else-can-i-do/floating-blocks.html
I'm trying to create this 4 column footer, with a copyright section at the bottom, but no matter what I try, it's unresponsive and completely broken.
Thank you all so much for your help with this issue! It has been greatly appreciated.
Here is the small code I have at the moment.
html{-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility;}
body{ font-size:14px; font-family: 'Montserrat', Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif;}
h1, h2, h3, h4, h5, h6{ font-weight:700; line-height: 1em; text-transform:uppercase; }
h1{ font-size:3em; margin-bottom:15px;}
h2{ font-size:2.2em; margin-bottom:15px;}
h3{ font-size:1.9em; margin-bottom:10px; margin-top:20px; }
h4{ font-size:1.5em; margin-bottom:10px; margin-top:15px;}
h5{ font-size:1.2em; margin:10px 0 5px; line-height:1.8em}
h6{ font-size:1em;}
p, label{margin:10px 0 10px; line-height:1.8em; font-size:1em; font-weight:300;}
ul, ol{margin:15px 0 15px 30px;line-height:1.8em; font-size:1em; }
strong{font-weight:700;}
.alignleft{text-align:left !important;}
.aligncenter{text-align:center !important; margin-left:auto !important; margin-right:auto !important;}
.alignright{text-align:right !important;}
.preload{height:0;}
a{ color:inherit; text-decoration:none; cursor:pointer;}
a:hover{cursor:pointer;}
#wrapper{position:relative; overflow-x:hidden;}
.wrap{max-width:1600px; margin:0 auto; position:relative;height:100%;}
.clear{clear:both !important; height:0 !important; padding:0 !important; margin:0 !important; float:none !important;}
blockquote{ padding:0 20px; margin-bottom:15px;}
/** FORM ELEMENTS **/
input[type=text],input[type=password],input[type=datetime],input[type=datetime-local],input[type=date],input[type=month],input[type=time],input[type=week],input[type=number],input[type=email],input[type=url],input[type=tel],input[type=color],input[type=search],select,textarea{border: 1px solid #AAA; height:auto; -webkit-border-radius:0; border-radius:0; -webkit-box-shadow:none !important; box-shadow:none !important;font-family: 'Montserrat', Gotham, "Helvetica Neue", Helvetica, Arial, sans-serif; padding:15px 20px; font-size:1em;}
select{-webkit-appearance:none;-moz-appearance: none; appearance: none; text-indent:10px; line-height:24px;border:1px solid #AAA; background:#FFF url(../images/select.png) no-repeat 97% center;}
select option:disabled{color:#AAA;}
textarea{height:140px;}
input[type=text]:focus, textarea:focus{border-color:#d0101f;}
input[type=submit], input[type=button], input[type=reset], .button{font-weight:normal; cursor:pointer; margin:10px auto; font-size:1em; border:none; display:inline-block; padding:20px; color:#FFF;background:#1a1a1a; text-transform:uppercase; text-align:center; min-width:100px;}
input[type=submit]:hover, input[type=button]:hover, input[type=reset]:hover{}
#back-to-top{width:32px; height:32px; line-height:30px; -webkit-border-radius:3px; border-radius:3px; background:none; right:20px; bottom:20px; position:fixed;}
#back-to-top:hover{}
#imagelightbox{position: fixed; z-index: 9999; -ms-touch-action: none;touch-action: none;}
#imagelightbox-overlay{background-color: #FFF;background-color: rgba( 255, 255, 255, .9 );}
body#error{background:url(../images/404-bg.jpg) no-repeat top center; background-size:cover; height:100vh;color:#ffde16 !important;}
body#error .wrap{max-width:1200px;}
body#error .wrap .inner{padding-top:15vh; width:50%;}
body#error h1{font-size:15em; margin:0 0 200px;}
.social{list-style:none; margin:20px 0 0 20px; padding:0;}
.social li{display:block; float:left; width:30px; height:30px; padding:0;-webkit-transition: all 400ms ease;-moz-transition: all 400ms ease;-ms-transition: all 400ms ease;-o-transition: all 400ms ease;transition: all 400ms ease; margin-right:10px; text-align:center;}
.social li a{display:block; font-size:14px; line-height:30px; width:100%; height:100%; color:#666;}
/********* HEADER *********/
nav ul ul,nav ul ul:before{background:#FFF;position:absolute}
nav ul li:after,nav ul ul:before{content:'';margin:0 auto;left:0;right:0}
header{background:#FFF;position:fixed;top:0;left:0;width:100%;z-index:999;-webkit-transition:all .4s ease;-moz-transition:all .4s ease;-ms-transition:all .4s ease;-o-transition:all .4s ease;transition:all .4s ease; height:100px; box-shadow:0 0 20px rgba(0,0,0,.3);}
header .wrap{padding:0 30px}
header #logo{float:left;margin:0 30px 0 0;}
header #logo img{height:95px}
header nav{padding:0}
header .social{float:right; margin-left:30px; margin-top:30px; margin-right:10px;}
nav ul{margin:0;padding:0;text-transform:uppercase;cursor:pointer}
nav>ul li a,nav>ul li span{ padding:30px 0 20px; display:block; color:#72a464; font-weight:400; font-size:16px;}
nav li{display:inline-block;padding:0 20px;font-size:.8em;position:relative; text-align:center;}
nav li a,nav li span{color:#1a1a1a;}
nav li a i,nav li span i{display:block !important; font-size:16px !important; margin-bottom:10px;}
nav ul ul{-webkit-border-radius:3px;border-radius:3px;display:none;top:125px;left:50%;width:320px;z-index:3;padding:10px;text-align:left;transform:translate(-50%,0);-webkit-box-shadow:0 0 20px 2px rgba(0,0,0,.3);box-shadow:0 0 20px 2px rgba(0,0,0,.3)}
nav ul ul:before{top:-5px;width:10px;height:10px;transform:rotate(45deg)}
nav ul ul ul{top:0;left:240px}
nav ul ul.show{display:block}
nav ul ul li{float:none;line-height:30px;font-size:.9em}nav ul ul a{line-height:30px!important}
nav ul ul a:after{display:none}
nav ul li:after{position:absolute;bottom:0;height:5px;width:0;-webkit-transition:all .4s ease;-moz-transition:all .4s ease;-ms-transition:all .4s ease;-o-transition:all .4s ease;transition:all .4s ease}
nav ul li.active:after{width:100%}nav ul li.active>ul{display:block}
#mobile,nav .mobilenav{display:none}
/********* BANNERS *********/
#cta{padding:0; margin-top:0; position:relative; z-index:2;}
#cta .wrap{max-width:none;}
#cta .cta{float:left; width:25%; height:240px; text-align:center; padding:0; position:relative;background:#FFF; overflow:hidden;}
#cta .cta img{display:block; margin:0 auto; object-fit:cover; max-width:100%;}
#cta .cta h4{text-transform:uppercase;color:#FFF; position:absolute; top:10px; left:0; right:0; text-align:center;text-shadow:2px 0 3px #000;}
#cta .cta p{ font-size:.9em; line-height:1.1em; margin:10px 25px; color:#333;}
#cta .button{margin:0 auto; width:360px; display:block;}
#secondary #hero{height:510px;background:url(../images/service.jpg) no-repeat center center; background-size:cover; position:relative;}
#secondary #hero .wrap{padding:0 50px;}
#secondary #hero h1{font-size:4em;text-shadow: 0 0 10px #000; color:#FFF; padding-top:250px; text-align:center;}
#secondary #hero h1 span{ display:block;}
#secondary #contacthero{height:510px;background:url(../images/contact.jpg) no-repeat center center; background-size:cover; position:relative;}
#secondary #contacthero .wrap{padding:0 50px;}
#secondary #contacthero h1{font-size:4em;text-shadow: 0 0 10px #000; color:#FFF; padding-top:250px; text-align:center;}
#secondary #contacthero h1 span{ display:block;}
#secondary #testihero{height:510px;background:url(../images/testimonial.jpg) no-repeat center center; background-size:cover; position:relative;}
#secondary #testihero .wrap{padding:0 50px;}
#secondary #testihero h1{font-size:4em;text-shadow: 0 0 10px #000; color:#FFF; padding-top:250px; text-align:center;}
#secondary #testihero h1 span{ display:block;}
#content{padding:100px 0;}
#content .image, #content .content{width:50%; float:right; position:relative; min-height:400px; z-index:1; top:0}
#content .content{padding:30px 2% 30px 4%; width:44%; min-height:400px;}
#content .content.empty{top:0; height:0; display:none;}
#content .image .inner{position:absolute; top:0; left:0; right:0; width:100%; height:100%;}
#content .image.right, #content .image:nth-child(4n){float:left;}
#content .image img, #content .image iframe{position:absolute; top:0; left:0; height:100%; min-height:400px; z-index:1;}
#content .image iframe{width:100%; height:auto;}
#content .image:nth-child(4n) img{left:auto; right:0;}
#content .content:nth-child(5n){padding:30px 4% 30px 2%;}
#content hr{border:none; height:0; clear:both;margin:0;}
#content h2{font-size:3em;position:relative; margin-bottom:40px;color:#1a1a1a;}
#content h2 span{color:#ffc000;}
#content h3{font-size:2.5em;text-align:left; position:relative; margin-bottom:20px;color:#1a1a1a;}
#content h4{font-size:1.8em;color:#1a1a1a;}
#content h6{color:#696969;}
.work h2{text-align:center;color:#1a1a1a;}
.thumb{float:left; width:25%; position:relative; overflow:hidden; height:280px;}
.thumb img{position:absolute; top:50%; left:50%; display:block; transform:translate(-50%,-50%); min-height:100%; min-width:100%;}
#banner{height:400px; margin-bottom:50px; position:relative; overflow:hidden;}
#banner .image{background:url(../images/slider.jpg) no-repeat center center; background-size:cover; position:absolute; top:0; left:0;width:100% !important;}
.upright-monuments #banner .image{background-image:url(../images/user_uploads/uprightbanner.jpg);}
.flat-markers #banner .image{background-image:url(../images/user_uploads/markerbanner.jpg);}
.vases-benches #banner .image{background-image:url(../images/user_uploads/vasebanner.jpg);}
#testimonialbanner{background:url(../images/banner-testimonial.jpg) no-repeat center center fixed; background-size:cover; color:#FFF; padding:150px 0; text-align:center;}
#testimonialbanner .wrap{position:relative}
#testimonialbanner h2{font-size:3em; padding-left: 20px; text-transform:uppercase;}
#testimonialbanner h2 span{ display:block; font-size:.5em;}
#testimonialbanner .message{position:relative;max-width:768px;margin:0 auto;z-index:2}
#testimonialbanner p{font-size:1em; padding-left: 20px;max-width:768px; margin:0 auto;}
.quote{position:absolute;z-index:1;color:#FFF;font-size:15em;font-family: 'Passion One', cursive; opacity:.3;}
.quote.open{top:-120px;left:-10%}
.quote.close{bottom:-120px;right:-10%}
#content .testimony { float: left; width: 28%; margin: 0 1% 20px; padding: 20px 1%; border: 1px solid #CCCCCC;}
#content .testimony .testimony-description {display : none;}
#content .testimony h4, #content .testimony h6 {text-align : center;}
#secondary #content .testimony h4 {font-size : 1.2em;}
#content .testimony h6 {height : 32px;}
#content .testimony p { height : 75px;}
#content .testimony .button {margin: 15px auto 0;display: block;width: 140px;}
#partnerbanner{background:url(../images/banner-partner.jpg) no-repeat center center fixed; background-size:cover; color:#FFF; padding:150px 0; text-align:center;}
#partnerbanner h2{font-size:3em; padding-left: 20px; text-transform:uppercase;}
#partnerbanner h2 span{ display:block; font-size:.5em;}
#partnerbanner p{font-size:1em; padding-left: 20px;max-width:768px; margin:0 auto;}
#partnerbanner .button{background:#FFF; color:#665446;}
.team {width: 31%; float: left; margin: 20px 1%; position: relative;text-align: center;}
.team .img img{display:block; margin:0 auto; max-height:300px;}
.team h5{color:#1a1a1a;}
.contact-us .pad{padding-left:50px; padding-right:50px;}
.contact-us .address{text-align:right; color:#696969; border-bottom:1px solid #CCC; text-transform:uppercase; padding:10px 0;}
.contact-us .address strong{text-align:left; float:left; color:#1a1a1a; font-weight:normal;}
#map{height:420px; width:100%; margin-top:40px;}
.doc{width:100%; text-align:left; margin:20px 0; display:inline-block; height:auto;position:relative;background:#FFFFFF;overflow:hidden;border:1px solid #CCCCCC;}
.doc.video{width:48%}
.doc .cap{width:100%;background:#EEE;position:relative;height:180px;overflow:hidden;border-bottom:1px solid #CCCCCC}
.doc .cap .icon{width:60px;height:75px;margin:50px auto;text-align:center;color:#FFFFFF;position:relative;font-size:24px;line-height:75px;background: #1a1a1a;}
.doc .cap .icon:after{position:absolute;content:'';top:-15px;right:-15px;width:25px;height:25px;transform:rotate(45deg);background:rgba(255, 255, 255, .5)}
.doc p{margin:10px;line-height:16px; color:#1a1a1a;font-family: 'Montserrat';}
.doc.doc-small img{width:auto;max-height:100% !important;max-width:none}
/********* FOOTER *********/
footer{padding:40px 0; color:#696969; background-image:url(../images/footer.png); background-size:100% 100%; height:400px;}
footer .wrap{padding:0 30px;}
footer .logo{float:left;}
footer .logo img{height:80px; display:block; margin:0 auto;}
footer ul{list-style:none; margin:0 ; padding:0;text-transform:uppercase; float:none;}
footer ul li{display:inline-block; padding:0 15px;}
footer .social{float:left;}
footer nav{float:right;}
footer nav ul li{float:none;}
footer nav ul li i{display:none !important;}
footer .mobilenav{display:inline-block;}
footer li.close.mobilenav{display:none;}
footer nav>ul li a, footer nav>ul li span{padding:10px 0 0;}
footer ul ul{display:none;}
footer #copyright{padding:0 0; margin-top:0; margin-right:60px;}
footer p{ margin:0 auto; text-align:right; font-size:.8em; text-transform:uppercase;}
footer .dev{background:url(../images/iwwlogo.png) no-repeat center center; text-indent:-999em; margin:0 0 0 20px; display:inline-block; width:20px; height:25px; position:absolute; bottom:0; right:40px;}
/********* IMAGE SLIDER *********/
#hero{position:relative; overflow:hidden; height:768px; z-index:1;}
.bxslider{margin:0 !important; position:fixed !important; overflow:hidden; height:768px; z-index:1; background:#111;}
.bxslider li{height:768px; position:relative; overflow:hidden;}
.bxslider li .wrap{z-index:2; text-align:left; padding:0 0;}
.bxslider .region{max-width:768px; position:absolute; top:40%; bottom:0; margin:auto 0;}
.bxslider .region.left{left:2%;}
.bxslider .region.left{max-width:600px;}
.bxslider .region.center{right:0; left:0; margin:0 auto; text-align:center;}
.bxslider .region.right{right:2%;}
.bxslider .title{}
.bxslider h2{font-size:5em; margin:0;}
.bxslider h3{font-size:5.8em; margin:0;}
.bxslider h5{font-size:1em; line-height:1.4em;}
.bxslider p{font-size:.85em;line-height:1.4em;}
.bxslider .button{ margin:60px auto 0; text-align:center; text-transform:uppercase; width:140px; color:#1a1a1a; padding:15px 0;}
.bxslider li .background{position:absolute; top:0; left:0; right:0; width:100%; height:100%; margin:0 auto; z-index:1;}
form .row{max-width:800px;margin:0 auto; clear:both;}
form h4{ text-align:center; margin:30px auto 20px;}
form .button{ margin:30px auto 0; border-radius:30px; width:25%; background-color:#6db9fa; font-weight:bolder; font-size:16px}
form .panel{}
form .panel.hide{display:none;}
/********* ANIMATIONS *********/
#keyframes slidedown {
from {top:-200px;}
to {top:0;}
}
/********* MODAL AND OVERLAY *********/
.overlay {position: fixed;z-index: 9999;left: 0;right: 0;top: 0;width: 100%;height: 100%;opacity:.8;display: none; background:#000;}
.modal { position: fixed; top: -1000px;max-width: 800px;padding: 50px;left: 0;right: 0; margin: 0 auto; z-index: 10000;-moz-transition: all 400ms linear;-ms-transition: all 400ms linear;-o-transition: all 400ms linear;transition: all 400ms linear;-webkit-transition: all 400ms linear; background:#FFF; box-shadow:0 0 40px rgba(0,0,0,.3);}
.modal .inner {position: relative;overflow-y: scroll;min-height: 30vh;max-height:75vh;}
.modal .modalclose {color: #c2c2c2;position: absolute;top: 10px;right: 20px;font-size: 3em;}
*, *:before, *:after {box-sizing: border-box;}
.controls {padding: 1rem; text-align:center;}
.control {position: relative; display: inline-block; cursor: pointer; background:none; border:none; font-size:1em;font-family: 'Montserrat'; text-transform:uppercase;color:#696969;}
.mixitup-control-active{color:#1a1a1a;}
.mixitup-control-active[data-filter]:after {position:absolute; content:''; width:100%; height:3px; bottom:-5px; left:0; right:0; background: #1a1a1a;}
.control[data-filter] + .control[data-sort] {margin-left: .75rem;}
.container {padding: 1rem; text-align: left;font-size: 0.1px;}
.container:after { content: ''; display: inline-block; width: 100%;}
.mix, .gap { display: inline-block;vertical-align: top; float:left;}
.mix { width:23%; margin:20px 1%; height:200px;position: relative; overflow:hidden;}
.mix[style*="display: none;"]{height:0; padding:0;}
.mix[style*="display: none;"] img{height:0; width:0;}
.mix a{position:absolute;}
.mix img{max-width:100%;}
.mix:before {content: ''; display: inline-block; padding-top: 56.25%;}
#contactform1{
text-align:center;
margin-bottom:40px;
color:#1a1a1a;
}
#contactform1 .sendmessagetext{
padding-top:50px;
text-transform:none;
padding-bottom:35px;
}
#contactform1 form{
width:50%; margin:0 auto;
}
<footer>
<div class="wrap">
<img src="<?=$SITEURL;?>/images/logofooter.png" alt="<?=$SITENAME;?>">
<nav>
<?php echo $objmenu->showTopMenu(0);?>
</nav>
<div class="clear"></div>
<div id="copyright">
<p class="copy">Copyright 2017 <?php echo date('Y'); ?> <?=$SITENAME;?> Residential Cleaning & Organizing. All Rights Reserved.</p>
</div>
<div class="clear"></div>
Developed by Integrated Webworks
<i class="fa fa-arrow-up"></i>
</div>
</footer>
</div>
<?php include_once("analyticstracking.php") ?>
footer I'm trying to create
I suggest you use Bootstrap if you want to make your life easier. Easy to use and responsive ready.
<div class="container">
<div class="row">
<div class="col-md-3">col</div>
<div class="col-md-3">col</div>
<div class="col-md-3">col</div>
<div class="col-md-3">col</div>
</div>
</div>
or you can do this:
<div class="container">
<div class="footer">
<div class="col-1">col</div>
<div class="col-2">col</div>
<div class="col-3">col</div>
<div class="col-4">col</div>
</div>
</div>
CSS:
.container {
width: 900px;
margin: 0 auto;
}
.footer {
width: 100%;
float: left;
}
.col-1,
.col-2,
.col-3,
.col-4 {
width: 25%;
float: left;
}
I am fetching ads name from the database and populating in my webpage but as it increases it overlaps the container.
I need to increase the div container as ads increases in ads_container and vice versa.
My PHP Code for the webpage is
<div id="ads_container">
<?php
//current URL of the Page. cart_update.php redirects back to this URL
$current_url = base64_encode($url="http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$results = $mysqli->query("SELECT * FROM ads ORDER BY ad_id ASC");
if ($results) {
//fetch results set as object and output HTML
while($obj = $results->fetch_object())
{
echo '<div class="ads">';
echo '<div class="ad"><img src="images/'.$obj->ad_img_name.'"></div>';
echo '</div>';
}
}
?>
</div><!-- End of div ads_container -->
My CSS code
/* default marging and padding of website */
*{
margin:0px;
padding: 0px;
}
#container{
width:900px;
height:auto;
background:#CCCCCC;
margin-right:auto;
margin-left:auto;
position:relative;
}
/* HEADER SECTION */
#mainheader{
width:900px;
height:70px;
background:#00001F;
}
#logo{
padding:10px;
width:149px;
height:38px;
float:left;
background:url(../images/flipkart_india-b1a41241.png);
background-repeat:no-repeat;
background-position:center;
}
#cart{
float:right;
margin:15px 30px 10px 10px;
background:#FFCC00;
padding:8px 20px 8px 20px;
border-radius: 8px;
}
#cart a{
text-decoration:none;
text-align:center;
color:#003399;
text-shadow:#FF0000;
}
#subheader{
width:900px;
background:#003333;
height:50px;
}
#header ul{
padding:10px;
list-style:none;
}
#header ul li{
padding:10px;
float:left;
width:150px;
text-align:center;
}
ul li a{
text-decoration:none;
color: #FFFFFF;
}
#electronics ul{
list-style:none;
}
#electronics ul li{
background:#003333;
color:#fff;
}
#electronics ul li:hover{
background:#555;
}
#header ul li li a{
text-decoration:none;
color:#fff;
}
/* BODY SECTION */
body{
font-family:Arial, Helvetica, sans-serif;
}
#content{
padding: 0px;
width:900px;
position:relative;
height:auto;
}
#main{
margin:10px;
width:670px;
float:left;
height:auto;
}
#slider_header{
width:670px;
height:80px;
margin: 10px;
}
#slider1{
margin:0px 10px 10px 10px;
width:671px;
height:300px;
overflow:hidden;
background-image:url(../images/small-loader.gif);
background-repeat:no-repeat;
background-position:center;
}
#slider1 img{
display: none;
}
#ads_container{
clear:both;
width:170px;
background-color:#CCCCCC;
border:1;
border-color:#000000;
position:absolute;
top:0px;
right:0px;
margin:10px;
padding:10px;
height:auto;
}
.ads:hover{
border:1px solid #000000;
}
Remove the absolute position on your div, and put a float on instead. Also remove the clear:both;
#ads_container {
width: 170px;
background-color: #CCCCCC;
border-color: #000000;
top: 0px;
right: 0px;
margin: 10px;
padding: 10px;
height: auto;
float: right;
}
I want to make my footer full width but its not becoming full with by assigning #footer:100%;
Well, When i make the .container and .wrapper to 100% it become full width but content also become full width. here the image! (with .container and .wrapper to 100% )!
image link: http://i44.tinypic.com/33ysups.jpg
here is footer.php
<?php wp_footer();?>
<div class="footer">
<div class="footer_left">
<h3>text here</h3>
<ul>
<?php dynamic_sidebar('footer-left');?>
</ul>
</div>
<div class="footer_left">
<h3>Weitere Informationen:</h3>
<ul>
<?php dynamic_sidebar('footer-mid');?>
</ul>
</div>
<div class="footer_right">
<h3>text here</h3>
<ul>
<li>
<img src="<?php bloginfo('template_url');?>/images/newsletter.png" alt="newsletter" width="16px" height="16px" />Newsletter
</li>
<li>
<img src="<?php bloginfo('template_url');?>/images/facebook.png" alt="facebook" width="16px" height="16px" />Facebook
</li>
<li>
<img src="<?php bloginfo('template_url');?>/images/twitter.png" alt="twitter" width="16px" height="16px" />Twitter
</li>
<li>
<img src="<?php bloginfo('template_url');?>/images/googleplus.png" alt="googleplus" width="16px" height="16px" />Google +
</li>
</ul>
</div>
</div>
</body>
</html>
here is style.css
* {margin:0px; padding:0px;}
img { border:none; outline: none;}
ul,li {list-style:none;}
body {background: url(images/bg.png) repeat;}
h2 { font-family:Arial; font-size:16px; font-weight: bold; color: #95cd32;}
h4 { font-family:Arial; font-size:16px; font-weight: normal; color:#b400b4;}
h3 {font-family:Arial; color:#b400b4; font-size:16px; margin:15px;}
a { font-family:Arial; text-decoration: none; }
#font-face {
font-family: 'JellykaCuttyCupcakes';
src: url('fonts/Jellyka CuttyCupcakes.ttf');
font-weight: normal;
font-style: normal;
}
#font-face {
font-family: 'HarabaraHand';
src: url('fonts/HarabaraHand.ttf');
font-weight: normal;
font-style: normal;
}
.container {width:902px; height: auto; margin:0 auto;}
.wrapper {width:902px; height: auto; margin: 0 auto;}
.logo {width:902px; height:140px; top: 12px;}
.logo img {}
.logo h1 {font-size:42px; margin:0; margin-left:20px; padding:0px 0 0 20px; background: url(images/header_logo.jpg) 0% 50% no-repeat; text-indent:-9999px;}
.logo a {text-decoration: none; margin:0; padding:0px; display:inline; }
.logo span {margin-left:20px; font-size:22px; color: #8D8D8D;}
/*****************************************************************************************
**************************** menu ******************************/
#nav { width:100%; height:54px; background-color: #ffffff; }
#nav ul{ list-style-type: none; margin-bottom: 5px; padding-top:10px; z-index:500;}
#nav ul ul {padding:2px;}
#nav ul ul li a {background:#A1D34C; color:#fff;}
#nav ul ul li a:hover {background:#AF00BD; color:#fff;}
#nav ul li{ display: inline; float:left; margin-right:0px; padding:0; position:relative;}
#nav ul li:hover>a { cursor: pointer; color:#A1D34C; }
#nav li li>a:hover { background:#B301B7;}
.menu-main-menu-container ul li+li {border-left:2px solid #b000b1;}
ul.sub-menu{ width:200px; height:auto; position:absolute; top:35px; display:none; }
.menu-main-menu-container ul li a {text-decoration:none; font-size:18px; color:#b000b1; text-transform:uppercase; text-align:left; font-weight:bold; padding:5px 32px; display:block;}
#nav li ul{ position:absolute; width:200px; display:none; top:100%; left:0; }
#nav li:hover ul{ display:block;}
#nav li li{ border-left:0;}
.sub-menu li{ float:left; width:100%; border-bottom:1px solid #B401B2;}
.sub-menu li:last-child{border:none!important;}
ul.sub-menu li a:hover{ background:#95cd32!important; }
.banner{ width:100%; height:330px; margin:20px 0px 15px; background:#fff; overflow:hidden;}
.banner img {width:100%; height:330px;}
#cat { padding:12px 7px 6px; margin-right:10px; font-size:18px; border:none; background:#fff; -webkit-border-radius: 10px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 10px; -moz-border-radius-bottomleft: 0; border-radius: 10px; border-bottom-left-radius: 0; width:150px; }
/*****************************************************************************
**************************************** Search *******************************************/
#search {height:40px; background-color: #f9f9f9; padding:15px 10px; }
#search input[type=text],input[type=submit] { width:445px; margin-right:10px; padding:10px 15px 7px; font-family:Arial; font-size:14px; color:#000; border:none; background:#fff; -webkit-border-radius: 0px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 0px; -moz-border-radius-bottomleft: 0; border-radius: 0px; border-bottom-left-radius: 0; }
input[type=submit] {background:#a2d34d; color:#fff; width:auto; margin-top:0px!important; }
.ssingle {width:610px;margin:0px 5px 20px 0px;height:100%;color:#666;font: 13px Arial;background:#f9f9f9 url(images/title.png) top repeat-x;padding:5px; border:1px solid #dadaaa;}
.ssingle h2 {margin: 0px 0 0px 0;padding: 10px 0px 10px 10px;text-align: left;font: 24px Arial;font-weight:normal;overflow:hidden; }
.ssingle h2 a, .ssingle h2 a:link, .ssingle h2 a:visited {color:#B401B2; background-color: transparent;}
.ssingle h2 a:hover {color: #228fc4;background-color: transparent;}
#single_post_head .post-thumb img{ max-width:250px;}
.title{margin: 0 0 0 0px;padding: 0px 0px 0px 0px;}
h2.pagetitle {padding:0px; margin:0 0 15px; font-size:30px;text-align:center;color:#A3D34C;font-family:Arial; text-shadow:1px 3px 10px #CCCCCC;}
h2.pagetitle a {color:#507409;}
.cover { margin:0 0;padding: 0px 10px ;}
.entry { margin:0 0; padding: 0px 0px ;}
.entry a:link, .entry a:visited { background-color: transparent;}
.entry a:hover {color:#fff;background-color: transparent;text-decoration: none;}
.entry ul, .entry ol{ margin: .4em 0 1em; line-height: 150%;}
.entry ul li, .entry ol li{ list-style-position:outside; margin-left: 1.6em;}
.entry p{font-size:16px; margin:0px 0px 5px; padding:5px 0px; line-height:22px;}
.singleinfo {font:10px Arial; text-transform:uppercase; color:#B98302; padding:5px 0px;}
.category{ padding:5px 0 5px 5px; }
.category>a:link,.category>a:visited{ color:#F7DB18; }
.category>a:hover{ color:#fff; }
#navigation{ margin:10px 0px 0px 0px; padding:0px 5px 10px 0px; width:700px; }
/***********************************content************************************/
#content{ width:100%; height:auto; float: left; margin:20px 0 0 0px;}
#content>h3 {margin-left:25px; font-size:16px; font-family: Arial;}
.content_left{ width:625px; height:auto; float:left; font-family:Arial; margin-left:10px; margin-top: 0px;}
#nach_themen {width:600px; height:auto; border:1px solid #ccc; padding:10px 5px; margin-bottom:5px; background:#fff; -webkit-border-radius: 0px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 0; -moz-border-radius-bottomleft: 0; border-radius: 0; border-bottom-left-radius: 0;}
#nach_themen .themen {width:184px; height:auto; border:1px solid #ccc; float:left; margin-left:10px;}
#nach_themen .themen img {width:180px; height:130px; padding:2px;}
#nach_themen .themen h2 {text-transform:uppercase; color:#a3d34c; text-align:center; margin:20px 0 10px;}
.blog_post{width:608px; height:auto; float:left; margin-top: 5px;}
.blog_post img { width:250px; height:auto; float:left; margin: 10px 18px 20px 4px;}
.blog_post.blog_template img{ margin:margin: 10px 10px 20px 10px;}
.blog_post.blog_template .post_content{ margin-right:10px; padding-top:5px;}
.blog_post.blog_template .post_content p{ color:#000;}
.blog_post h2 {margin:4px 0 8px;}
.blog_post ul{ list-style-type:none;}
.blog_post ul li{ width:100%; height:auto; float:left; margin-bottom:30px; border:3px solid #ccc;}
.post_image{width:250px; height:auto; float:left; margin:0 20px 15px 0px;}
.post_content {width:300px; height:auto; float: left;}
.post_content h4 {font-family: Arial; font-size:16px; color:#55247a;}
.post_content h3 {font-weight:normal; font-family:Arial; font-size:14px; color:#000; margin:8px 0 3px; padding:0;}
.post_content p {font-size:16px; font-family:Arial; line-height:22px; margin:10px 0;}
.post_content span:nth-child(4){font-size:14px; font-family:Arial; width:300px; height:auto; float:left; margin:10px 0 4px; }
.post_content span:nth-child(5){font-size:16px; font-weight:bold; font-family:Arial; color:#a3d34c; width:200px; height:auto; float:left; margin:10px 0; }
.post_content .read_more{ display:block; color:#fff; font-family:Arial; font-size:16px;}
.single_post_image{width:250px; font-family:Arial; height:auto; float:left; margin:0 20px 15px 0px;}
.single_post_content{width:335px; font-family:Arial; height:auto; float:right;}
.featured_post {overflow:hidden; float:left; font-family:Arial; /*border:1px solid #ccc;*/ margin-bottom:20px;}
.featured_post h2 {color:#a3d34c; margin:5px 0 15px 0;}
.featured_post img {margin:10px 15px 15px 5px; border:none; float:left;}
.featured_post p {height:auto; float:none; font:18px, font-family:Arial; font-weight:normal; text-align:justify; padding:0 8px 5px;}
.home_post .post_content{ width:auto!important; height:auto; float:none!important; font-family:Arial; padding: 5px 5px 10px 0;}
.home_post img { width:250px; height:auto; float:left; margin: 4px 30px 0px 0px;}
.home_post.page_single .featured_image{ padding-left:10px; padding-top:10px; height:200px; margin-bottom:10px;}
.home_post.page_single .featured_image img{ width:600px; max-width:600px height:auto; float:left; margin:0; }
.home_post.page_single h2{ color:#B400B4; margin-top:20px; font-family:Arial; margin-left:10px;}
.read_more{ width:34px; height:20px; font-size:28px; margin:0 10px 10px 0; padding:7px 8px 5px; display:block; text-align:center; float:right; background:#a3d34c; color:#fff; -webkit-border-radius: 0px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 0px; -moz-border-radius-bottomleft: 0; border-radius: 0px; border-bottom-left-radius: 0; }
.first_post .post_content{ width:300px; height:auto; float:right; padding: 5px 5px 10px 0;}
.first_post img{ margin:5px 15px 15px 3px!important;}
.first_post span{ display:none;}
.first_post h2, .read_more{ display:none;}
.first_post .read_more{ display:none !important;}
.first_post h3{ display:none;}
.first_post h4{ display:none;}
.out_post{width:585px; height:auto; float:left; padding:10px 15px; border:1px solid #ccc;}
#single_post_head{ height:auto; float:left; padding-bottom:15px; font-family:Arial, border:1px solid #ccc; padding:10px;}
#single_post_head .home_post{ color:#000;}
.single_post{width:100%; height:auto; float:left; font-family:Arial; padding-bottom:15px; border-top:1px solid #ccc;}
.single>h2 {margin:10px 0 15px 0;}
/*.single p{float:left; font:18px, font-family:Arial; text-align:justify; }*/
.single>span {float:left; font:18px, font-family:Arial; width:275px; height:auto; }
#para {font:16px Arial;}
#cus_single h2 {margin:10px 0 20px;}
#cus_single span {float:left; font:18px, font-family:Arial; width:120px; height:auto; }
#cus_single p {float:left; width:150px; height:auto; }
#cus_single>p:nth-child(2) {float:left; font:18px; font-family:Arial height:auto; min-height:120px; width:220px;}
#course {padding:13px 0 0 0;}
#course>h2{float:left; margin:10px 0; width:230px; font-size: 20px;}
#course>a {float:left; display:block; padding:8px 15px; background:#B2CF39; color:#fff; font-size: 16px; margin-left:70px; -webkit-border-radius: 0px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 0px; -moz-border-radius-bottomleft: 0; border-radius: 0px; border-bottom-left-radius: 0;}
#customText {width:885px; height:auto; float:left; margin-bottom:15px;}
#customText h3 {margin:0 0 5px; font-size:16px; }
#customText .textwidget {font-family: Arial; font-size:14px; text-align:justify; word-wrap:break-word; line-height: 24px; }
#custom_social {width:870px; height:auto; margin:20px 0 40px;}
#telefon { float: right; line-height: 22px; margin-top: 2px; width: 305px; }
.single_child {width:100%; height:auto; float:left; padding-bottom:15px; border-bottom:1px solid #ccc;}
.nothing { font-size: 15px; background-color:transparent; border: 0px solid; }
/*************************************************************************************
******************************** sidebar **********************************************/
.sidebar{ width:250px; height:auto; float: right; margin:0px 0 0 12px; background:#fff;}
#sidebar_widgets {width:230px; height:auto; float:left; padding:8px 5px; margin-bottom:5px; background:#a3d34c; color:#fff; font-family:Arial; -webkit-border-radius: 10px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 10px; -moz-border-radius-bottomleft: 0; border-radius: 10px; border-bottom-left-radius: 0;}
#sidebar_widgets li {float:left; margin:10px 10px 10px 35px; list-style-image: url(images/list-style.png); font-size:14px; font-weight:bold;}
.sidebar_widgets {width:230px; height:auto; float:left; padding:8px 5px; margin:10px 0px; color:#000; }
#newsletter { font-size:14px; font-family: Arial; width:213px; padding:10px; height:auto; border:1px solid #ccc;}
#newsletter img {float:left; height:40px; width:40px;}
#newsletter h3{text-transform:uppercase; width:140px; color:#55247a; display:block; float:left; padding:0; margin:10px 0 10px 10px;}
#newsletter h3 span {font-family: Arial; font-size:16px; color:#b400b4;}
#newsletter a:link, a:visited, a:hover {font-family: Arial; color:#55247a;}
#facebook { width:213px; padding:10px; height:20px;}
#facebook h3{text-transform:lowercase; font-size:22px; color:#55247a; display:block; float:left; padding:0; margin:10px 11px;}
#facebook h3 span {color:#b400b4;}
#facebook .fb-overlay {position:relative; left:0!important;}
#google { width:213px; padding:10px 10px 0; height:30px; border:1px solid #ccc;}
#google h3{font-size:22px; margin:0 0 2px 0; padding:0; color:#B400B4; display:block; float:left; }
#google span:nth-child(2) {font-size:35px;}
#google>span:nth-child(4) {font-size:25px; font-family:JellykaCuttyCupcakes,HarabaraHand; margin-right:15px; float:right;}
#google img {vertical-align:middle; margin-left:10px;}
.testimonial_slides {height:300px; width:100%;}
.Home_post{width:608px; float:left;}
.Home_post ul{ list-style:none;}
.Home_post ul li{ width:100%; float:left; margin-bottom:30px; border:1px solid #A5A5A5;}
.Home_post img{ width:250px; height:auto; margin:10px 20px 15px 5px;}
.Home_post .post_content{ width:325px; height:auto; float:right;}
/******************************************footer****************************************/
.footer{width:960px; height:auto; float:left; font-family:arial; padding:0px 0 30px 0px; background:#6e6e6f;}
.footer_left {height:auto; width:35%; margin:10px 0 0 15px; padding:0; float:left; }
.footer_left h3 {color:#fff; margin-bottom:15px; margin-left:0;}
.footer_left a{ width:100%; height:auto; float:left; font-size:14px; margin-bottom:5px;}
.footer_left a:link, a:hover, a:visited {color:#fff;}
.footer_left .menu {list-style:none; margin-left:3px;}
.footer_left .menu li{font-size:18px; margin:4px 0;}
.footer_right {height:auto; width:25%; margin:10px 0 0 15px; padding:0; float:left;}
.footer_right ul { margin-left:17px; padding:0; }
.footer_right img {vertical-align:middle; margin:0 10px 5px 0; height:23px; width:23px;}
.footer_right h3 {color:#fff; margin-bottom:15px; margin-left:15px;}
.footer_right a{ width:100%; height:auto; float:left; font-size:14px;}
.footer_right a:link, a:hover, a:visited {color:#fff;}
.Social_Widget {margin-left:17px;}
.clear {clear:both;}
/* nsu-form */
.nsu-form input[type=text] { width:220px; padding:13px 10px 7px; font-size:18px; color:#fff; border:none; background:#D1D7C8; -webkit-border-radius: 10px; -webkit-border-bottom-left-radius: 0; -moz-border-radius: 10px; -moz-border-radius-bottomleft: 0; border-radius: 10px; border-bottom-left-radius: 0; }
.nsu-form p:nth-child(2) {margin:5px 0 0 80px;}
.nsu-form input[type=submit] {background:#b400b4; color:#fff; width:auto; cursor:pointer;}
.nsu-form label {font-family:arial; font-size:22px; color:#55247A; margin-right:10px;}
.nsu-error {margin-left:10px; color:red;}
.sign_up .nsu-signed-up {font-family:tahoma; font-size:20px;}
.sign_up {width:600px; height:auto; padding:0; margin:0; float:left;}
.sign_up h3 {font-family:Arial; font-size:22px; padding:0; margin:5px 0 15px;}
.sign_up img {width:600px; height:200px; margin:5px;}
}
any ideas??? why only footer is not becoming full width???
please...
You should move your footer <div class="footer"> ... </div> out of containers like .container and .wrapper if they have width:902px;
HTML:
<div class="footer">
<!-- footer content -->
</div> <!-- end of footer -->
</div> <!-- end of container has width:902px -->
</body>
</html>
Change:
</div> <!-- end of container has width:902px -->
<div class="footer">
<!-- footer content -->
</div> <!-- end of footer -->
</body>
</html>
CSS:
.footer{
width:100%;
/*another styles here*/
}
Your code is not enough realizable. Maybe need some CSS changes too.
This a joomla template I created from scratch.
It has some php, like all things in joomla, but please use css and html in your answers because php is not one of my strong skills.
The problem is the main menu.
In all the other browsers, the three elements in the header are pushing the menu out of the header div, putting it just below the bottom border where I want it to be.
My header height is on auto. I don't want to make it fixed and I don't want to use positioning.
I want to stick it under the header.
The ul li are dynamically created by joomla and I am using rtl direction.
This image shows the IE problem
And this image is how I want it
http://www.flickr.com/photos/60188007#N07/5493611091/
#wrap
{
margin:0 auto;
width:100%;
height:auto;
background-color:#540501;
min-width:1100px;
}
#headr
{
margin:0 auto;
width:99%;
height:106px;
min-width:1000px;
background-color:#2c0300;
border-top:1px solid white;
border-bottom:1px solid white;
border-left:2px solid white;
border-right:2px solid white;
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius:20px;
direction:rtl;
}
#logo
{
margin:0 150px;
}
#bunner
{
float:right;
height:60px;
z-index:0;
}
/****************************************************************************
Maine Menu
****************************************************************************/
#maineMenu
{
width:73%;
height:auto;
min-width:900px;
z-index:11;
clear:both;
}
#maineMenu ul
{
list-style-type:none;
margin:0 auto ;
border:none;
}
#maineMenu ul li
{
margin:0 1px 0 0;
min-width:114px;
height:38px;
float:left;
text-align:center;
line-height:37px;
-webkit-transition: all 0.2s ease-out;
}
#maineMenu ul li a
{
text-decoration:none;
color:White;
font-size:1.2em;
border:none;
display:block;
}
#maineMenu ul li a span
{
padding:0 6px;
border:none;
display:block;
background-image:url("../images/buttonTopOnCenter.png");
background-repeat: repeat-x;
background-position:top;
-moz-border-radius:0 0 10px 10px;
-webkit-border-radius:0 0 10px 10px;
-o-border-radius:0 0 10px 10px;
border-radius:0 0 10px 10px;
}
/*************************************************************************************
Menu Hover
*************************************************************************************/
#maineMenu ul li:hover
{
background-color:#b9c119
background-repeat:no-repeat;
position: relative; top: -2px; left: -2px;
}
#maineMenu ul li a:hover
{
text-decoration:none;
color:White;
font-size:1.2em;
border:none;
display:block;
background-color:#b9c119;
background-repeat:no-repeat;
background-position:top right;
position: relative; top: -1px; left: -1px;
}
#maineMenu ul li a span:hover
{
padding:0 6px;
border:none;
display:block;
background-repeat: repeat-x;
background-image:url("../images/buttonTopCenter.png");
-moz-box-shadow: 3px 3px 5px #2C0300;
-webkit-box-shadow: 5px 5px 5px #2C0300;
box-shadow: 5px 5px 5px #2C0300;
position: relative; top: -1px; left: -1px;
}
<div id="wrap">
<div id="headr">
<div id="logo">
<jdoc:include type="modules" name="logo" style="xhtml"/>
</div>
<div id="topMenu">
<jdoc:include type="modules" name="topMenu" style="xhtml"/>
</div>
<div id="bunner">
<jdoc:include type="modules" name="banner" style="xhtml"/>
</div>
<div id="maineMenu">
<jdoc:include type="modules" name="menu" style="xhtml"/>
</div>
</div>
</div>
IE has some issues with z-index: 0; try starting at z-index: 1;,
#bunner
{
float:right;
height:60px;
z-index:1; /*change 0 to 1*/
}