Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Full Width Image with CSS

Posted on 2014-12-09
3
Medium Priority
?
252 Views
Last Modified: 2014-12-09
I feel really dumb but I cannot get my header image to be full width. I've researched all the various CSS articles on this which include max-width, background-cover...etc. Yet I can't get my CSS to work.
This is element I'm trying to make full width ( I think):

#site-logo .cs-logo1x

Site: http://beloveden.com

 I cannot figure out why the image won't go full screen. Any help appreciated.
0
Comment
Question by:doug s
[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 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 40489825
You have to specifically define 100% width on the parent and child elements, in this case the anchor and img.

style.css, line 801:

#site-logo a {
    display: inline-block;
    width: 100%;
}

style.css, line 822:

#site-logo .cs-logo1x {
    display: inline-block !important;
    width: 100%;
}
0
 
LVL 4

Author Comment

by:doug s
ID: 40489902
Thank you so much Tom. How did you know that the anchor was the parent?
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 40489947
You're welcome.

Look at the page in any browser and open the web inspector (like Firebug in Firefox). You will see how the page is being interpreted by the browser regardless of whether the content is being generated dynamically or it's pure HTML markup. I don't know how that image inside the anchor looks on the back end, but for troubleshooting styling problems like this, use a web inspector so you can look directly at the DOM tree of the rendered page. The anchor is clearly the parent of the image from that view.
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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

609 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