Background problem
#1
Posted 14 August 2005 - 01:39 PM
but it turns out that i used more of the page than i expected so now the background dosent fit
How can i change the background for i have already saved it as a template
Cheers
#2
Posted 14 August 2005 - 02:31 PM
#3
Posted 14 August 2005 - 02:32 PM
thats exactly my problem
#4
Posted 14 August 2005 - 04:38 PM
<style type="text/css">
body{
background:url(address/to/bg.gif) #fff;
repeat:repeat-x;
}
that makes the background image repeat itself only horizontically, so just change "#fff" with whatever color you want the bg to be after the image stops.
heres a tutorial i made a while back that goes really indepth on it
http://www.scudworkz...ls/backgrounds/
#5
Posted 14 August 2005 - 05:23 PM
is there a way that you can repeat the image but have the image upside down.
So the gradient blends in
Cheers
#6
Posted 14 August 2005 - 05:54 PM
#7
Posted 14 August 2005 - 07:19 PM
body {
background: url(images/splash_background.gif) repeat-x #ABC6E1;
margin: 0px;
padding: 0px;
}
'background' is a 'short-hand' property, I incorporated all background properties in one simple property rule. Basically, I have the splash_background.gif gradient image repeat along the X-Axis, and it's automatically placed up at the top of the webpagfe, and the hexidecimal color is the color in which the gradient flows into. Hope this helps you.
EDIT: Basically what Cool-aid said. :S
Edited by Silwolffe, 14 August 2005 - 07:20 PM.
#8
Posted 15 August 2005 - 06:16 AM
#9
Posted 15 August 2005 - 08:50 AM
edit: or is there anyway to x-repeat the background in a table?
Edited by Avalanche, 15 August 2005 - 09:04 AM.
#10
Posted 15 August 2005 - 10:04 AM
Make sure the background color matches the hexidecimal value of the last pixel color one the bottom of your gradient image, that way you have a nice, consistent flow.
Example:
------------------------------------
Background Image; Repeat-X
------------------------------------
Background color (default value is repeat, so it naturally goes everywhere).
Keep in mind, that in my CSS code I use shorthand-properties, so you wont see something like;
body {
background-image: url(images/LOLZ.gif);
background-color: #FFF111;
background-repeat: repeat-x;
padding-top: 1px;
padding-right: 2px;
padding-bottom: 3px;
padding-left: 4px;
margin-top: 1px;
margin-right: 2px;
margin-bottom: 3px;
margin-left: 4px;
}
See how long that is? Here is the exact same thing put into a shorthand-property.
body {
background: url(images/LOLZ.gif) #FFF111 repeat-x
padding: 1px 2px 3px 4px
margin: 1px 2px 3px 4px
}
Now it's simple.
EDIT: From what I mean by only one background, is, you can only define one background for every style rule you create. Basically, you will want to set your background properties with your <body> element type selector for your CSS rule. However, if you try and give your <body> tag multiple backgrounds by creating new IDs/Classes and placing them in <div> tags with a low z-index value, I don't think you're going to win.
And I hope this helps you in some way, sorry if I'm not too good at explaining it. If you're still confused, I'll try to explain it again unless someone else wants to step in.
Edited by Silwolffe, 15 August 2005 - 10:19 AM.
#11
Posted 15 August 2005 - 11:14 AM
and how about a table background, can u also reapeat table bg's along the x
lol,i hope i make any sense
#12
Posted 15 August 2005 - 02:18 PM
td {
background: url(images/lolz.gif) #FFF111 repeat-x;
}
td is a table cell HTML tag, and with the CSS rule all your table cells will be fitted with that background and repeat along the x axis.
Or, if you want, you can define a special class that can only be applied to td tags;
td.special {
background: url(images/lolz.gif) #FFF111 repeat-x;
}
You would define the class in your html like so;
<table width="200" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="special">nummy text</td> </tr> </table>
#13
Posted 15 August 2005 - 03:36 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
