Solved

Full Width Image with CSS

Posted on 2014-12-09
3
238 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 500 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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

728 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