responsive header image

I have a header
.siteheader {
      height : 155px;
      width : 100%;
      max-width: 1200px;
      margin:0 auto;
      background-repeat : no-Repeat;
      background-image : url("../images/header1.png");
      background-position : 0px 0px;
      background-size: 100% auto !important;
      /*border-bottom:1px solid #999;*/
}
as you can see I have the image resize according to browser size

I REALLY want this border-bottom but have commented it out because as the image height decreases then I have empty blank space within the header because the header itself is not resizing - so removing the border looks like the empty space belongs to the content area below the header.

question is how can I resize the header as the browser window changes size
I can then probably use background-size 100% 100%
I've tried
.siteheader {
      max-height : 155px;
      height : auto;
      min-height : ???;
what would i put for min-height?

or actually what should I do here with this situation?
thanks
LVL 25
dgrafxAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimorosCommented:
Can you provide a link?
Julian HansenCommented:
Either you distort your header image or use cover which will chop bits off occasionally or you don't use the border.

If you set background-size: cover; you should solve the problem without distorting the image but it will potentially chop the top / sides off as you resize.

If you use 100% / 100% the image will distort to meet the changing size.

You could use media queries to alter the height of the header - proportionally the height is going to gain prominence as the screen size gets smaller - so pick the common screen sizes that are catered for in responsive design and set the height accordingly to keep your image proportions right OR to display a different image that will fit the space better.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dgrafxAuthor Commented:
I solved it by using both cover and a media query to swap out one of the images
I originally didn't want to use cover because I had some text that was being cropped
I broke the header image into 2 images and used your suggestions
Thanks

.siteheader {
      height:155px;
      min-height:77px;
      width : 100%;
      max-width: 1200px;
      margin:0 auto;
      border-bottom:1px solid #999;      
      background-image : url("../images/header2AF.png"), url("../images/header2.png");
      background-position : 60% 70%, 0px 0px;
      background-repeat : no-Repeat;
      background-size: initial, cover;      
}
@media only screen and (max-width: 768px) {
      .siteheader {
            background-image : url("../images/header2AF-sm.png"), url("../images/header2.png");
            background-position : 60% 70%, 0px 0px;
            background-repeat : no-Repeat;
            background-size: initial, cover;
      }
      
}
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.