Sky-sama 0 Posted September 4, 2011 Report Share Posted September 4, 2011 I have been working for hours, but I don't really know how to make my header fit the browser width.I'm using a big image as header (1920x1080), but I don't know how to fit the browser window. I'd like to make something that looks like this:http://i53.tinypic.com/21nffr8.pngCould you please help me?Your support is appreciated . Quote Link to post Share on other sites
ApocalypeX 3 Posted September 4, 2011 Report Share Posted September 4, 2011 I have been working for hours, but I don't really know how to make my header fit the browser width.I'm using a big image as header (1920x1080), but I don't know how to fit the browser window. I'd like to make something that looks like this:http://i53.tinypic.com/21nffr8.pngCould you please help me?Your support is appreciated .Set the image as the background.background:url(image) #color center top no-repeat scroll;You want to make sure the left, right and bottom have a gradient color which matches the background colour incase the viewer has a bigger screen than the image. Quote Link to post Share on other sites
Sky-sama 0 Posted September 4, 2011 Author Report Share Posted September 4, 2011 It doesn't resize the image at all .How to resize using css? Quote Link to post Share on other sites
ApocalypeX 3 Posted September 4, 2011 Report Share Posted September 4, 2011 (edited) It doesn't resize the image at all .How to resize using css?Fine if you really want to, but it's really not a smart thing to do for screen size compatibility.1 - CSS3 lets you http://www.css3.info/preview/background-size/2 - Use some Javascript on an img tag to resize it to the browser, and place it behind the main content with CSS.Also that website's header doesn't resize, but whatever. Edited September 4, 2011 by ApocalypeX Quote Link to post Share on other sites
Ingolme 1,032 Posted September 4, 2011 Report Share Posted September 4, 2011 You don't need Javascript to get an image to resize with the browser, just give it a percentage width. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.