divs move when resizing the page - html

I have a timeline on a site I'm trying to recreate and when I resize the window to mobile, the divs get separated. I'm a little far into the site and am very cautious about what I need to do to make this work. The timeline has icons (which have their own div) & a icon background (which have their own div too) but I think I need to wrap them around in one larger div to make this work, but not sure how.
See images here for a before I resize and after I resize:
See how the icons get separated from the background?
Html code for each item in timeline:
<div class="timeline_item">
<div class="timeline_time"><p><em>1 hr ago</em></p></div>
<div class="icon_background"></div>
<div class="timeline_icon "><i class="ss-icon">doc</i></div>
<div class="timeline_text"><p>You read the article </p> </div>
</div>
CSS:
.timeline_item {
width: 100%;
padding-bottom: 17%;
}
.timeline_item .timeline_time {
float: left;
width: 20%;
}
.timeline_item .timeline_icon {
float: left;
width: 1%;
}
.timeline_item .timeline_text {
float: left;
width: 65%;
padding-left: 3%;
}
.timeline_icon {
margin-left: -4%;
margin-top: 2.5%;
}

Without access to a proper Jsfiddle Demo, here's one suggestion with a reduced HTML structure which uses pseudo-elements.
You could use an icon-font, sprite or whatever where I have used a single letter.
Codepen Demo
HTML
<div class="timeline">
<article class="timeline_item">
<div class="timeline_time">
<p>1 hr ago<p>
</div>
<div class="timeline_text" data-event-type="doc"><p>You read the article </p> </div>
</article>
<article class="timeline_item">
<div class="timeline_time">
<p>1 hr ago<p>
</div>
<div class="timeline_text" data-event-type="alert"><p>You have a 'Do Not Miss' Meeting scheduled for tomorrow 9a.m.</p> </div>
</article>
<article class="timeline_item">
<div class="timeline_time"><p>1 hr ago<p>
</div>
<div class="timeline_text" data-event-type="video"><p>You watched a video</p> </div>
</article>
</div>
CSS
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.timeline {
width:50%;
margin: 1rem auto;
border:1px solid lightgrey;
}
.timeline_item {
display: table;
width:100%;
}
.timeline_time,
.timeline_text {
display: table-cell;
padding:1rem 2rem;
}
.timeline_time {
width:25%;
text-align: right;
border-right:1px solid lightgrey;
}
.timeline_text {
position: relative;
}
[data-event-type]:before {
position: absolute;
content:"";
width:32px;
height:32px;
line-height: 32px;
text-align: center;
color:white;
left:0;
top:0;
border-radius: 50%;
transform:translate(-50%,50%);
}
[data-event-type="doc"]:before {
content:"D";
background: #00f;
}
[data-event-type="alert"]:before {
content:"A";
background: #f00;
}
[data-event-type="video"]:before {
content:"V";
background: #0f0;
}
The techniques shown here might help you wit your current issue(s).
There are, of course, alternatives to this layout method, including floats and actual tables. some of those will require 'fixes' to achieve the 'equal heights' that is native to CSS tables.

Since there was no complete html or css, this is a mobile first approach that requires fairly decent css skills to follow, but it starts off in a logical way for small viewports and adjusts fluidly. The min-width is where the layout for larger view ports starts. The styles before this are global (shared by all view port sizes).
DEMO: http://jsbin.com/zerijo/1/
http://jsbin.com/zerijo/1/edit
CSS:
/*demo only body */
body {
font-family: sans-serif;
background:#fff;
padding:5%;
}
/* ---------- timeline styles ------------ */
.timeline_wrapper:after, .timeline_item:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.timeline_wrapper, .timeline_item {
display: inline-block
}
* html .timeline_wrapper, * html .timeline_item {
height: 1%
}
.timeline_wrapper, .timeline_item {
display: block
}
.timeline_wrapper,
.timeline_wrapper div,
.timeline_wrapper *:before,
.timeline_wrapper *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
.timeline_wrapper {
position: relative;
padding-top: 10px;
line-height: 1.5;
}
.timeline_wrapper:before {
position: absolute;
top: -5px;
bottom: 10px;
left: 15px;
content: "";
height: 100%;
display: block;
border-right: 1px solid #777;
width: 1px;
z-index: -1;
}
.timeline_wrapper p {
margin: 0
}
.timeline_icon i {
background: red;
display: block;
border-radius: 50%;
width: 30px;
height: 30px;
line-height: 32px;
text-align: center;
font-size: 15px;
color: #fff;
float: left;
}
.timeline_text {
float: left;
width: 100%;
padding: 0 0 0 40px;
}
.timeline_time {
padding-left: 40px
}
.timeline_item {
width: 100%;
position: relative;
}
.timeline_item:not(:last-child) {
padding-bottom: 30px;
}
#media (min-width:480px) {
.timeline_wrapper {
position: relative;
padding-top: 10px;
}
.timeline_wrapper:before {
left: 27%
}
.timeline_item > div {
float: left;
position: relative;
}
.timeline_time {
width: 22%;
text-align: right;
padding: 0;
left: -10%;
}
.timeline_icon {
width: 10%;
min-height: 50px;
left: 22%;
top:-5px;
}
.timeline_icon i {
margin: 0 auto;
float: none;
}
.timeline_text {
float: left;
width: 100%;
margin-left: -37%;
padding: 0 0 0 37%;
}
}
HTML -- structured differently for mobile then adjusted position at the min-width:
<div class="timeline_wrapper">
<div class="timeline_item">
<div class="timeline_icon">
<i class="your-icon"></i>
</div>
<div class="timeline_time">
<p><em>1 hr ago</em></p>
</div>
<div class="timeline_text">
<p>Lack of peppering one's sentences with gerunds.Lack of peppering one's sentences with gerunds. Lack of peppering one's sentences with gerunds. You read the article </p>
</div>
</div>
<div class="timeline_item">
<div class="timeline_icon">
<i class="your-icon"></i>
</div>
<div class="timeline_time">
<p><em>1 hr ago</em></p>
</div>
<div class="timeline_text">
<p>You read the article Lack of peppering one's sentences with gerunds. Lack of peppering one's sentences with gerunds.Lack of peppering one's sentences with gerunds.Lack of peppering one's sentences with gerunds.</p>
</div>
</div>
<div class="timeline_item">
<div class="timeline_icon">
<i class="your-icon"></i>
</div>
<div class="timeline_time">
<p><em>1 hr ago</em></p>
</div>
<div class="timeline_text">
<p>You read the article.</p>
</div>
</div>

Related

Responsivness:div resizes depending on inline div

First div element is facing downwards,i've had this kind of problem and could not understand it, i'm just making simple grid layout 24% | 50% | 24% but as you see first div is doing weird thing, if you solve it and explain why this phenomenon happens and am i doing this simple grid correctly please give your opinions,thanks in adnvance.
html {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
border: 0;
font-size: 25px;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.nav-top {
width: 100%;
background-color: #f00000;
}
.row {
width: 100%;
display: inline-block;
color: #fff;
border: 1px solid gray;
}
.row p {
font-size: 90%;
float: left;
}
.nav-top-col-sm {
width: 24%;
display: inline-block;
}
.nav-top-col-sm span {
float: right;
}
.nav-top-col-lg {
width: 50%;
display: inline-block;
background-color: black;
}
<nav class="nav-top">
<div class="row">
<div class="nav-top-col-sm">
<span>En</span>
</div>
<div class="nav-top-col-lg">
<p>FB,Twitter,Google,Wifi,Youtube</p>
<p>market</p>
</div>
<div class="nav-top-col-sm">
<p>My Account</p>
</div>
<!-- Col-->
</div>
<!-- Row -->
</nav>
When you set the display property to inline or inline block, you should set
vertical-align: middle; for them.
Also u dont need to set the width to 24% to get them on one line.
U need to set the font size:0 on the parent, and give individual font sizes to each inline-block.
This happens because, the inline blocks have some white-space, which pushes them on next line, when 25% width is given.
html {
box-sizing: border-box;
}
body {
margin: 0;
padding: 0;
border: 0;
font-size: 25px;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.nav-top {
width: 100%;
background-color: #f00000;
}
.row {
width: 100%;
display: inline-block;
color: #fff;
border: 1px solid gray;
}
.row p {
font-size: 90%;
float: left;
}
.nav-top-col-sm {
width: 24%;
display: inline-block;
vertical-align: middle;
font-size: 20px;
}
.nav-top-col-sm span {
float: right;
}
.nav-top-col-lg {
width: 50%;
display: inline-block;
background-color: black;
vertical-align: middle;
font-size: 20px;
}
<nav class="nav-top">
<div class="row">
<div class="nav-top-col-sm">
<span>En</span>
</div>
<div class="nav-top-col-lg">
<p>FB,Twitter,Google,Wifi,Youtube</p>
<p>market</p>
</div>
<div class="nav-top-col-sm">
<p>My Account</p>
</div>
<!-- Col-->
</div>
<!-- Row -->
</nav>

keep space between div's

I want show a html div wich contains a state-descritpiton with a circle (green or red). This circle shows the state of the enigne in the right corner of the description.
My problem is the following. If the windows size has changed (smaler), the description and the "state-circle" overlap each other.
How can i prevent this?
Do you know how the css-code should be?
structure is mainly this:
.statusdiv{
height: 40px;
}
.statusbeschreibung{
position: absolute;
margin-left: 40%;
}
.statuskreis {
position: absolute;
width: 25px;
height: 25px;
top: 13px;
/*left: 190px;*/
margin-left: 60%;
border: 1px solid black;
text-align: center;
border-radius: 12.5px;
}
.status-on{
background-color: green;
}
.status-off{
background-color: red;
}
<div class="list-block">
<ul>
<li>
<div class="statusdiv">
<p class="statusbeschreibung">Motorstatus</p>
<div name="motorstatus" id="motorstatus" class="item-link statuskreis status-off"></div>
</div>
</li>
</div>
This was based on your original screenshot images of your code: basically you should use display:inline-block instead of position:absolute to prevent your bullet from overlapping your text, and then use a margin-left on the bullet so that it always has enough space between it and the text.
.list-block ul {
padding: 0;
margin: 0;
}
.list-block li {
list-style: none;
}
.statusdiv {
white-space: nowrap;
}
.statusbeschreibung {
margin-left: 40%;
display: inline-block;
vertical-align: middle;
}
.statuskreis {
width: 25px;
height: 25px;
margin-left: 10px;
border: 1px solid black;
text-align: center;
border-radius: 12.5px;
display: inline-block;
vertical-align: middle;
}
.status-on {
background-color: green;
}
.status-off {
background-color: red;
}
<div class="list-block">
<ul>
<li>
<div class="statusdiv">
<p class="statusbeschreibung">Motorstatus</p>
<div name="motorstatus" id="motorstatus" class="item-link statuskreis status-off"></div>
</div>
</li>
<li>
<div class="statusdiv">
<p class="statusbeschreibung">Motorstatus</p>
<div name="motorstatus" id="motorstatus" class="item-link statuskreis status-on"></div>
</div>
</li>
</ul>
</div>
If I'm understanding it correctly, you style the circle with the class "motortatus".
Try to set the width and height in percentages, not in pixels. This should resize the status circle and prevent it from overlapping with the description, except the font of the description doensn't resize at all and fills up the whole div.
I love inline lists for this sort of thing, but you can also do columns in your preferred css framework of choice.
I've styled it so each of the two list items is 50% of the width of the ul container, but you can tweak those as you see fit.
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.statusdiv {
list-style: none;
float: left;
margin: 0;
padding: 1em;
width: 100%;
color: #2d2d2d;
}
.statusdiv li {
width: 50%;
float: left;
padding: 0 1em;
}
.statusdiv li:first-child {
text-align: right;
height: 35px;
line-height: 35px;
}
.statusdiv li:last-child {
text-align: left;
}
.circle {
content: "";
background-color: aqua;
width: 35px;
height: 35px;
display: inline-block;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
}
<!-- EDIT THIS SNIPPET -->
<ul class="statusdiv">
<li>
Status thing:
</li>
<li><span class="circle"></span></li>
</ul>

CSS, two columns - left with dynamic width (input), right with fixed (button)

can somebody please point me to a solution for this?
HTML
<div class="container">
<input type="text" class="left" />
<button class="right">Some button</button>
</div>
CSS
.container {
display: table;
width: 100%;
background-color: red;
}
.left, .right {
display: table-cell;
}
.right { width: 100px; }
Here is code pen sample: http://codepen.io/be-codified/pen/qdRRBY
Input field should be stretchable, button should be fixed positioned on right.
Thank you in advance.
// edit
I can not use table tag because layout needs to be responsive.
I gave the input a width of calc(100% - 110px) and the button a float:right which resulted in the following. Is that what you need? The input type you want to use is, as far as I know, not stretchable by the user.
CSS
.container {
display: table;
width: 100%;
background-color: red;
}
.left, .right {
display: table-cell;
}
.right {
width: 100px;
float: right;
}
input.left {
width: calc(100% - 110px); //This makes sure the input area is as wide as possible, while also leaving space for the button. Play with the exact measurements to get what you need.
}
I suggest you to put the form elements into <div>, so don't change their default display properties, and then set the left input box to 100% width as needed.
.container {
display: table;
width: 100%;
background-color: red;
}
.left, .right {
display: table-cell;
}
.right {
width: 100px;
}
.left input {
width: 100%;
box-sizing: border-box;
}
<div class="container">
<div class="left"><input type="text" /></div>
<div class="right"><button>Some button</button></div>
</div>
In fact, both left and right can have dynamic width, so right column always get the minimum width based on the button length.
.container {
display: table;
width: 100%;
background-color: red;
}
.left, .right {
display: table-cell;
white-space: nowrap;
}
.left {
width: 100%;
}
.left input {
width: 100%;
box-sizing: border-box;
}
<div class="container">
<div class="left"><input type="text" /></div>
<div class="right"><button>Some button</button></div>
</div>
Here is full responsive solution.
HTML
<div class="container">
<div class="input-flied-box">
<form>
<input type="text" required="required" placeholder="Right Some thing" />
<button type="submit" class="submit-button">Send</button>
</form>
</div>
</div>
CSS
/* RESPONSIVE CSS */
.container{
width: 100%;
}
.input-flied-box{
width: 100%;
}
.input-flied-box input{
padding: 6px 12px 6px 12px;
}
.submit-button{
top: inherit;
right: inherit;
position: relative;
margin-bottom: 15px;
}
#media (min-width: 768px){
.container{
width: 750px;
}
.input-flied-box{
width: 600px;
}
.input-flied-box input{
padding: 6px 101px 6px 12px;
}
.submit-button{
top: 14px;
right: 14px;
position: absolute;
margin-bottom: 0;
}
}
#media (min-width: 992px){
.container{
width: 960px;
}
}
#media (min-width: 1200px){
.container{
width: 1170px;
}
}
/* RESPONSIVE CSS END */
*:after,
*:before{
box-sizing: border-box;
}
*{
box-sizing: border-box;
}
.container:after,
.container:before{
display: table;
content: " ";
clear: both;
}
.container{
margin-left: auto;
margin-right: auto;
}
.input-flied-box {
background-color: #666666;
margin-left: auto;
margin-right: auto;
padding-left: 15px;
padding-right: 15px;
position: relative;
}
.input-flied-box input {
background-color: #ffffff;
border: 1px solid #cccccc;
height: 40px;
margin-bottom: 15px;
margin-top: 15px;
width: 100%;
border-radius: 4px;
}
.submit-button {
background-color: #fc3850;
border: medium none;
border-radius: 4px;
color: #ffffff;
font-family: Arial;
line-height: 1;
padding: 13px 30px;
text-transform: uppercase;
}
https://jsfiddle.net/bL3wgrv9/

My links are no more clickable because it is behind other element

I need to present a header menu with 3 elements:
one is left aligned
one is centered
one is right aligned
I would like a gray background for this menu.
The problem: if I have links in my left or right elements and it is not clickable because of the centered element.
How to prevent this problem? or another way of having this kind of menu?
Any idea is highly appreciated.
jsFiddle: http://jsfiddle.net/sxmf0Lve/
<div class="headerContainer">
<div class="headerLeft">
Left
</div>
<div class="headerTitle">Middle</div>
<div class="headerRight">
Right
</div>
</div>
.headerContainer {
padding-top: 10px;
padding-left: 0px;
padding-right: 5px;
max-width: 100%;
height: 30px;
background-color: #fcfcfc;
border-bottom: 1px solid #f6f6f6;
}
.headerTitle {
position: absolute;
/* z-index: -1; */
top: 10px;
width: 100%;
margin: auto;
text-align: center;
font-size: x-large;
font-weight: bold;
}
.headerLeft {
float: left;
}
.headerRight {
float: right;
}
Updated fiddle: http://jsfiddle.net/7mo7hyza/
Your z-index idea is good, but you didn't perform it well: z-index only works between elements that are both not in the normal workflow of the document (they have position: absolute/relative/..)
So you simply have to position your left/right containers with position: absolute instead of float, and make the big container relative so that you can position the other containers relatively to that one.
.headerContainer {
position: relative;
} .headerTitle {
z-index: 0;
} .headerLeft {
position: absolute;
left: 0;
z-index: 1;
} .headerRight {
position: absolute;
right: 0;
z-index: 1;
}
Make the left and right position relative and give them a higher z-index.
.headerContainer {
padding-top: 10px;
padding-left: 0px;
padding-right: 5px;
max-width: 100%;
height: 30px;
background-color: #fcfcfc;
border-bottom: 1px solid #f6f6f6;
}
.headerTitle {
position: absolute;
/* z-index: -1; */
top: 10px;
width: 100%;
margin: auto;
text-align: center;
font-size: x-large;
font-weight: bold;
}
.headerLeft,
.headerRight {
position: relative;
z-index: 2;
}
.headerLeft {
float: left;
}
.headerRight {
float: right;
}
<div class="headerContainer">
<div class="headerLeft">
Left
</div>
<div class="headerTitle">Middle</div>
<div class="headerRight">
Right
</div>
</div>
Try to avoid using float-ing elements or messing with the z-index. There are two more appropriate methods for what you're trying to achieve:
Method 1: CSS box model
.headerContainer {
padding-top: 10px;
padding-left: 0px;
padding-right: 5px;
max-width: 100%;
height: 30px;
background-color: #fcfcfc;
border-bottom: 1px solid #f6f6f6;
display: flex;
flex-wrap: nowrap;
}
.headerLeft,
.headerTitle,
.headerRight {
display: inline-block;
}
.headerLeft,a
.headerRight {
flex-grow: 0;
}
.headerTitle {
flex-grow: 1;
text-align: center;
font-size: x-large;
font-weight: bold;
}
<div class="headerContainer">
<div class="headerLeft">
Left
</div>
<div class="headerTitle">Middle</div>
<div class="headerRight">
Right
</div>
</div>
See JsFiddle
Method 2: Table layout
.row {
display: table-row;
width: 100%;
background-color: #eee;
}
.cell {
display: table-cell;
}
.middle {
width: 100%;
text-align: center;
}
<div class="headerContainer row">
<div class="cell">
Left
</div>
<div class="cell middle">
<h1>Middle</h1>
</div>
<div class="cell">
Right
</div>
</div>
See JsFiddle

Attempting to resize img with CSS, not responding to any size attributes

I don't have a web development background, but have a small business client who has me doing other things who got me working on their web site. I've designed a home page, more or less ready for me to turn it into a template in whatever CMS we decide to use.
It was going great until I started replacing blank divs with images. Now that I'm putting in the proxy images, everything is breaking down.
The primary issue is that the CSS attributes are not resizing the image, but the image at full size would be acceptable if the rest of the body actually flowed in such a way that the image wasn't covering it when rendered.
So far, I've tried adding height and with attributes to the img tag equal to both the actual height of the image and the height I'd like it to be. (310px for the desktop width.)
I've also tried nesting the image inside a div inside the section and applying widths there. I ended up with other problems, I assume from the shortcuts I took in the CSS, but even after changing how I was designating the description, it still was not resizing and the overflow was not being hidden.
Here's a JSFiddle.
The current HTML:
<body>
<header id="page-head" class="clearfix">
<div id="logo">Logo</div>
<h1>Academic Tours and Travel</h1>
<nav>
<ul class="clearfix">
<li><div>Travel With Us</div></li>
<li><div>Sign In</div></li>
</ul>
</nav>
</header>
<section id="feature">
<img src="https://i.imgur.com/CG8cppD.jpg">
<div>
<h1>Malta-Sicily Delight</h1>
<p>Our star tour. Visit Malta and Sicily with our hand crafted tours.</p>
</div>
</section>
<div id="content-wrap" class="clearfix">
<div id="right-wrap" class="clearfix">
<section id="about">
<header><h2>About</h2></header>
<p>Founded in 1984, Academic Tours and Travel is a leading specialist in travel to Malta and Sicily. They also are home to experts in many European destinations including Italy and Romania.</p>
</section>
<section id="pledge">
<header><h2>Our Pledge</h2></header>
<p><em>"From Concept to Completion"</em></p>
<p>Our agents will work with you from the first idea until you pick you unpack. If we ever recieve complaints from a local provider they are investigated and blacklisted for at least a year.</p>
</section>
<a href="">
<div id="call" class="clear">
<h1>Browse our Destinations</h1>
</div>
</a>
</div>
<section id="contact">
<header><h2>Contact an Agent</h2></header>
<form>
<label>Name: <input type="text" name="name" placeholder="Jane Doe" required="true" /></label><br />
<label>Email: <input type="text" name="email" placeholder="address#server.com" required="true" /></label><br />
<label>What's your dream vacation? <textarea name="destination" placeholder="Sample text" required></textarea></label><br />
<button type="submit">Send</button>
<button type="reset">Reset</button>
</form>
</section>
</div>
</body>
Current CSS:
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
/* border: 1px solid black; */
}
html {
height: 100%;
}
a {
text-decoration: none;
}
body {
font-size: 62.5%;
margin: auto;
height: 600px;
font-family: Geneva, Tahoma, Verdana, sans-serif;
}
button {
width: 47%;
margin-right: 5%;
display: inline-block;
}
button:last-child {
margin-right: 0;
}
h1 {
font-size: 2.1em;
text-align: center;
color: #c2d22d;
}
h2 {
font-size: 1.6em;
text-align: center;
color: #c2d22d;
}
header {
background-color: #134313;
}
input {
width: 100%;
}
img {
height: 100px;
}
label {
font-size: 1.2em;
}
nav ul {
min-width: 350px;
position: relative;
}
nav li {
display: inline;
list-style: none;
text-align: center;
padding-top: 12px;
width: 25%;
min-width: 60px;
background-color: #B3DFB3;
position: absolute;
height: 40px;
font-size: 1.3333em;
border-radius: 5px;
}
nav li:hover {
background-color: #A4B4C7;
}
nav li:first-child {
left: 20%;
}
nav li:last-child {
right: 20%;
}
nav li a {
text-decoration: none;
color: #010A01;
}
nav li a div {
height: 100%;
width: 100%;
}
p {
font-size: 1.2em;
}
section p {
padding: 0 10px;
}
textarea {
width: 100%;
}
#page-head {
width: 100%;
height: 120px;
}
#call {
min-height: 60px;
}
#call:hover {
background-color: #A4B4C7;
}
#call h1 {
color: #134313;
padding: 15px;
}
#content-wrap {
background-color:#E0FEE0;
}
#logo {
display: none;
}
#feature {
clear: both;
position: relative;
}
#feature div {
width: 77.5%;
margin: auto;
position: absolute;
left: 11.25%;
bottom: 3.8461%;
}
#media screen and (min-width: 425px) {
#about {
margin-right: 5%;
}
#about, #pledge {
width: 47.5%;
float: left;
}
#call {
font-size: 1.3333em;
}
}
#media screen and min-width: 600px) {
#page-head h1 {
max-width: 100%;
text-align: left;
float: left;
}
#page-head nav {
max-width: 60%;
float: right;
}
}
#media screen and (min-width: 740px) {
body {
max-width: 960px;
}
button {
width: 46%;
}
/* IDs for specific features. */
#contact {
width: 30%;
}
#content-wrap {
width: 100%;
min-height: 250px;
}
#feature {
min-height: 310px;
width: 83.3333%;
margin: auto;
position: relative;
}
#logo {
display: block;
}
#page-head {
height: 60px;
}
#page-head > * {
float: left;
}
#page-head > nav {
float: right;
}
#right-wrap {
width: 65%;
height: 100%;
float: right;
}
}
/* Utility classes. */
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.clear {
clear: both;
}
Try setting
Img{ width:100%}
And then edit the height of the section #feature to the height you want it to be. The image will fill the the width of the section.