View Full Version : Backround not repeat? any code for this?
awelsh
28-05-2008, 06:18 PM
Didnt reallt know what to search for this, what I want is, for an image to show as the backround but when you scroll it doesnt repeat the image. once the image has finished id like the rest of the backround to be plain black. Can this be done?
Im sure its not that hard atall, but I just couldnt find anything when I searched.
:Liam
28-05-2008, 06:20 PM
background-repeat: No-repeat;
awelsh
28-05-2008, 06:25 PM
background-repeat: No-repeat;
thanks, ill have a try of that now :)
edit:
not sure where to put it in this really :P I currently have:
<body background="psrealm_r3_c8.png">
Tired placing it at the end but it just carried on, also where would I add the #000000 to make the black continue rather than the image?
awelsh
28-05-2008, 06:27 PM
Sorry, delete this post please :)
:Liam
28-05-2008, 06:32 PM
Using CSS so you put in the head.
<style type="text/css">
Background-color:000000;
Background-Repeat:No-Repeat;
</style>
awelsh
28-05-2008, 08:10 PM
Using CSS so you put in the head.
<style type="text/css">
Background-color:000000;
Background-Repeat:No-Repeat;
</style>
but I still need the image to be there, it hasnt worked. Ive got the image as the backround using:
<body background="psrealm_r3_c8.png">
Decode
28-05-2008, 08:14 PM
but I still need the image to be there, it hasnt worked. Ive got the image as the backround using:
<body background="psrealm_r3_c8.png">
<style type="text/css">
body {
background-repeat: no-repeat;
background-image: url('psrealm_r3_c8.png');
}
</style>add that to the head section of your page and remove background="psrealm_r3_c8.png" from the body tag.
the div style is:
<style type="text/css">
<!--
#divname{
background-image:"psrealm_r3_c8.png";
background-repeat:no-repeat;
}
-->
or
<style type="text/css">
<!--
body {
background-image:"psrealm_r3_c8.png";
background-repeat:no-repeat;
}
-->
awelsh
28-05-2008, 08:54 PM
Thanks, +rep to you all :)
Have it fixed at bottom right when you scroll:
background: #COLOUR url('image/image.ext') no-repeat fixed bottom right;
Edit bottom to centre and top and left and right or just delete it for dead in middle.
Klydo
29-05-2008, 06:29 AM
<body background="psrealm_r3_c8.png" style="background-repeat: no-repeat;">
Could of made it simpler for the boy :l
RYANNNNN
29-05-2008, 10:32 AM
Don't use that body tag, use <style> and put the css within it.
Klydo
29-05-2008, 11:42 AM
Don't use that body tag, use <style> and put the css within it.
Depends on his coding abilities. He may of never have heard of CSS using <style> so if he is coding using the <body> tag then the help should be geared towards that. Yes it's not the best practice in the world to use it like so, but he is coding like that already.
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.