|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
CSS background center? HELP
Hi, im a realy newbie in CSS...
Can anyone tell me how i can center my background image horizontally, while keeping the background at the very top. I have tried the background-position: center command but that puts the background in the center of the page which is not what im trying to do... thanks for your help! seb |
|
#2
|
|||
|
|||
|
wow! hey i just found out by sheer luck myself! thanks anyway!
|
|
#3
|
||||
|
||||
|
Glad you cured your problem. It is, however, considered polite and helpful to post the cure for the benefit of others who might have a similar problem.
cheers, gary |
|
#4
|
|||
|
|||
|
yeah sorry, i got caught up in the moment lol!
Anyway this is how i did it: body { background-image: url('http://BLAH BLAH'); background-repeat: no-repeat; font-family: "Courier New", Courier, mono; font-size: 11px } That was the code in my CSS file and the background was at the top left of the screen. So by simply adding this line to the code: background-position: center 70; you can see the it centralises the background horizontally on the page. Then the number 70 puts the backgroundimage 70 pixels down from the top. Really hope this helps someone! seb |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > CSS background center? HELP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|