Jump to content

Css background image


hoachen

Recommended Posts

i am working on css background and come across the screen resolution problem. RIght now my css background image have a fix width and height so if 15" screen the background image will display fit into the screen but when a 18"screen monitor, it will have lot of margin at left and right. My question is how can i make it fit into any screen that will depends on the user monitor screen?Please advice and will appreciate your time and precious advice.Cheers,hoachen

Link to comment
Share on other sites

well hoachen... i think i get what you mean, but yeh like BiteMe some code might help...and maybe a picture if that isn't asking too much :)well what I "THINK" you are saying is that the image you are using works on a 15" screen because it is that pixel width..(0.o) where as 18" (im used to metric..i think its called metric..) the image is too small...right?i think you can stretch the image a bit..with CSS, you are using one full background which isnt going to repeat right? As i said i 'think' you can stretch image..with something like..

.class of img tag..or w/e.{width:100%;}

i think...that might do it..or say if your background image is like one color except for the main image bit..lets say 'white'. then align the image to one side..and color the blank part white..so it looks like the image fits the background.

body{background:#fff /*white*/ url(imagelocation.jpg) no-repeat top right;}

but that would only work if your image was one color at either a certain edge or for whole background.well if that code is wrong or something or if its not what you wanted. then sorry...still not best at CSS...and please post image or code.--Reiyan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...