Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2015-02-20
3
Medium Priority
?
91 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
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
Suggested Courses

916 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