Sky-sama Posted September 4, 2011 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 . Link to comment Share on other sites More sharing options...
ApocalypeX Posted September 4, 2011 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. Link to comment Share on other sites More sharing options...
Sky-sama Posted September 4, 2011 Author Share Posted September 4, 2011 It doesn't resize the image at all .How to resize using css? Link to comment Share on other sites More sharing options...
ApocalypeX Posted September 4, 2011 Share Posted September 4, 2011 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. Link to comment Share on other sites More sharing options...
Ingolme Posted September 4, 2011 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.