Hi to everyone here,i have a little problem and i hope i can get help from here.
I am re-building my template to make it responsive design with zurb foundation framework,useing compass and sass and i have a little problem with
sliced design images i want to set width:100% of screen,the problem itself is: i have a 2 elements which have a background image,but they are inside my div wrapper and they dont fit 100% screen like i want.
For now i have only everything centered ,i have attached screenshot of problem.
Below is my base.scss code
body {
text-align: left;
background-image: image-url("content_bg.png");
}
#wrapper {
margin: 0 auto;
width: 960px;
}
/* LARGE TABLETS (UNDER 1024 PIXELS) */
@media screen and (max-width: 1023px) {
#wrapper {
width: 720px;
}
}
/* SMALL TABLETS/PHONES (UNDER 768 PIXELS) */
@media screen and (max-width: 757px) {
#wrapper {
width: 90%;
}
}
/* HIGH-RESOLUTION DISPLAYS */
@media only screen and (-moz-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (min-devicepixel-ratio: 1.5),
only screen and (min-resolution: 1.5dppx)
{
}
and here is my header.php code
<?php
/**
*
* Author: JI WebDesign
* Website: http://www.jyriizberg.eu
*
* */
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- Mobile viewport optimized -->
<meta name="viewport" content="width=device-width,initial-scale=1">
<title><?php wp_title ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link href="<?php bloginfo('template_url'); ?>/stylesheets/app.css" media="screen, projector, print" rel="stylesheet" type="text/css" />
<script src="<?php bloginfo('template_directory'); ?>/javascripts/foundation/foundation.min.js" type="text/javascript"></script>
<script src="<?php bloginfo('template_directory'); ?>/javascripts/foundation/app.js" type="text/javascript"></script>
<!-- WP Head -->
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper" />
<div class="topheaderbg" class="row" />
<div class="company_name"> <?php
$options = get_option('plugin_options');
echo $options[name];
?><!-- change company name-->
</div> <!--company_name -->
<div class="contact">
<p><?php
$options = get_option('plugin_options');
echo $options[phone];
?></p> <!-- change company phone numbers-->
</div> <!-- contact-->
</div><!-- topheaderbg-->
<div id="header" />
<!--
Orbit slider
-->
<div id="featured" />
<img src="<?php bloginfo('template_directory'); ?>/images/foundation/orbit/slideimages/office_slide1.png" alt="office-template" />
<img src="<?php bloginfo('template_directory'); ?>/images/foundation/orbit/slideimages/office_slide2.png" alt="office-template" />
<img src="<?php bloginfo('template_directory'); ?>/images/foundation/orbit/slideimages/office_slide3.png" alt="office-template" />
</div>
<script type="text/javascript">
$(window).load(function() {
$("#featured").orbit();
});
</script>
</div><!-- header-->
<?php wp_nav_menu(array('menu' => 'Menu')); ?>
and finally my header scss code:
// Compass
@import "compass";
// Import Settings file containing Foundation defaults
@import "settings";
// Import normalize (A modern, HTML5-ready alternative to CSS resets) http://necolas.github.com/normalize.css/
@import "normalize";
// Import Settings file containing Foundation defaults
@import "base";
// Import navigation
@import "navigation";
// Include font for company name
@include font-face("b820-script", font-files("b820-script/b820-script.ttf", "b820-script/b820-script.eot", "b820-script/b820-script.woff", "b820-script/b820-script.svg"));
.company_name {
font-family: "b820-script";
font-size: 36px;
color:$companynameColor;
}
.contact {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 11px;
color:$companynameColor;
}
.topheaderbg{
width: 100%;
height: 76px;
background-image: image-url("topheader_bg.png");
}
#header{
width: 100%;
height: auto;
overflow: hidden;
background-image: image-url("slider_bg.png");
}
i know its simple fix,but i have no ideas anymore,and its my first responsive design and first time use of zurb framework.
I hope anyone can help,tnx alot.