{A_K_A} Posted November 16, 2008 Share Posted November 16, 2008 Hi,I have an image as my header. I would like to get it to shrink and grow with the screen (because people will be viewing might sight at different res's).At the moment the end of image gets cut off.Thanks in advance {A_K_A} Link to comment Share on other sites More sharing options...
Ingolme Posted November 16, 2008 Share Posted November 16, 2008 Are you referring to a background image or an image tag?You can't resize a background image, you can give a percentage width to an image with CSS. I'm not sure if it will resize the height proportionally though.I personally recommend you use an image with a width of around 960 pixels at most for the header of your site. I usually like to use 760 though, so that it will be visible on 800x600 screens. Link to comment Share on other sites More sharing options...
{A_K_A} Posted November 17, 2008 Author Share Posted November 17, 2008 Hi,Thanks for you help, I am using a back ground image, here is my code: height: 185px; /* height of the replacement image */ background-image: url("HeaderH.jpg"); background-repeat: repeat ;Am I correct in thinking there is no way to re-size the image depending on user res?Thanks again. Link to comment Share on other sites More sharing options...
Ingolme Posted November 17, 2008 Share Posted November 17, 2008 CSS can't resize background images, unfortunately. but depending on how important the edges of the image are, you can position it centered and have both edges cut off equally on smaller resolutions. Use background-position to center background images. Link to comment Share on other sites More sharing options...
rzea Posted November 17, 2008 Share Posted November 17, 2008 I don't want to say is not possible, but it could be a lot of work to make that happen.Nonetheless, take a look at these links about resizing a background image, probably they could help in some way:http://css-tricks.com/how-to-resizeable-background-image/http://www.cssplay.co.uk/layouts/background.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.