Solved

CSS question: how to stretch an image to full screen width

Posted on 2015-02-20
3
87 Views
Last Modified: 2015-02-20
I've been having trouble with this one. I need to stretch an image to the full width of a screen, no matter what screen resolution. I am pretty sure I can do that with CSS.

Here is the web site: http://www.leafyhead.com/

In the header area you can see the logo image. I'd like to stretch that image to whatever the width of the screen is.

Does the image need to be a background image?

Is there a CSS style that will do what I need?

Thanks as always for your help.

Eric
0
Comment
Question by:Eric Bourland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 40621604
Just use background-size:cover for the CSS of the element where you are using it.

Cd&
0
 
LVL 3

Author Comment

by:Eric Bourland
ID: 40621613
Got it. I was looking for that. =) I'll go try it now. Thank you!
0
 
LVL 3

Author Closing Comment

by:Eric Bourland
ID: 40621701
Thanks for pointing this out to me. =)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question