[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Adding PNG IMage to Twitter Bootstrap header

Posted on 2014-03-26
2
Medium Priority
?
4,714 Views
Last Modified: 2014-03-26
I've recently used Twitter Boostrap has a base for my design for my web application.  Unfortunately, as with any framework including CSS, it comes with a learning curve.  I have been tasked with adding a background image to the bootstrap header but unfortunately, it does not stretch enough to cover the header.  So for the nav header section, if I were to add the following code:

.navbar.navbar-inverse.navbar-fixed-top{
    background-color:black;
    position:static;
    height:100px;
    

}

Open in new window

the header appears fine.  But if I were to add the following code:

.navbar.navbar-inverse.navbar-fixed-top{
    background-image:
    position:static;
    height:100px;   
}

Open in new window


it doesn't look good.  The png image doesn't stretch to be the full height of the header.  How do I fix this?  Thanks!
0
Comment
Question by:VBBRett
[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 Comments
 
LVL 8

Accepted Solution

by:
soupBoy earned 2000 total points
ID: 39956548
I don't know if this would work as I haven't toyed with Bootstrap much, but have you tried adding 'background-size: cover;'?

Example:
.navbar.navbar-inverse.navbar-fixed-top{
    background-image: yourPnghere.png
    background-size: cover;
    position:static;
    height:100px;  
}

If you could provide a link of the broken version (with png file not stretched) it would be helpful to debug...

- Chris
0
 

Author Comment

by:VBBRett
ID: 39956571
WHOA!  That worked, awesome!  500 points for you!
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

649 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