Miss_Thang
02-24-2005, 05:39 AM
how do i center my background image? i usually put background-position: center; but then it comes out messed up, and u can't see my image! :confused:
|
View Full Version : center background image, how? Miss_Thang 02-24-2005, 05:39 AM how do i center my background image? i usually put background-position: center; but then it comes out messed up, and u can't see my image! :confused: kittycat 02-24-2005, 07:26 PM That is the right code to centre it. A link to the page/code would help to see if something else is causing the problem. Dutch.American 02-24-2005, 08:08 PM Did you make sure the image has the right name? Or if it's uploaded or in the same folder as the page with the CSS code on it. body { background: #ffffff; background-image: url(YOURIMAGE.gif); background-repeat: no-repeat; background-position: center center; background-attachment: value; [scroll, fixed] } Miss_Thang 02-25-2005, 12:28 AM Ok, I want my layout something like this http://ciarafan.com/top.html where I have a background, and then my other image. I made the background here: http://ericbal4.net/test15.htm and I want my other "image" to be in the center of it. Like the site above and this here : drewfullerfan.com thnx :) I hope that helped. ;) kittycat 02-25-2005, 02:40 AM Your background comes up as a 2MB image for me. That is MUCH too large, you definitely need to scale it down. There's no need to have a 1000x7000px image. There's also nothing on that page so we can't really tell if what you're doing has errors. To make a layout like the one you posted you can either just put <center> before the entire layout or put it in a table, making sure not to use absolute positioning. Miss_Thang 02-25-2005, 03:24 AM Ok, thanks. The background image that I showed you us what I want as a background. But to make sure it fit, I made it large. So what size should I make it then, if it's too large? So...yeah that's my background and then I made another image which I'll put the center tage ;) Just wondering, so I can kno and not make it too large or too small, what size should I make this image? For the <center></center tags? I want it this size: http://drewfullerfan.com/index.php thnx :) *hope it's not cunfusing! kittycat 02-25-2005, 03:28 AM That image is arouund 750px. With that size it will fit nicely into 800x600 resolution + (found that by right clicking on image > properties) For the background image, the best thing to do is get it so that it can be repeated. Try cropping it to a new 25x25 file, and repeating it to see if it gets the same look... I don't have much experience with background images so I can't help you much there. Miss_Thang 02-25-2005, 05:29 AM Thnx. I got the image size :) I Just need to know what size to make my background. I tried what u said making it a 25x25, but it dodn't work :( So I hope some one can help me with that :) Thnx for your help Kittycat :)!! |