Hi, I am trying to make this background image Fixed.
<div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table1" height="100%"
background="http://labradio.co.uk/Themes/Azure_Black_Final/images/img/back.jpg">
<tr>
<td width="100%" align="center" valign="top" height="150" colspan="3">
I know how to do this in the .css
{
background: url(images/img/back.jpg) repeat;
background-attachment: fixed;
background-color: #000000;
padding: 20px 5px 0 5px;
}
I've spent a while trying to figure it out with no success. It's probably simple enough... When you know how =]
ZTN
What are you trying to do? I have just run a test with this background on my site here (http://www.lesmonds.co.uk/smf/index.php?page=40) is this what you want
umm... sort of :) Not quite though.
If you look at this article:
http://labradio.co.uk/index.php?page=16
I'm wondering if I can fix it in the same way as the background outside the forum frame.
So that the text and Video's float over it the same way the forum does over the main background.
It may take a while to load as it has several YouTube Videos.
I dont think that can be done in a article, but someone may come along with a better idea
Since you know how to do it with css, do it with inline css.
<div align="center">
<table border="0" cellpadding="0"
style="border-collapse: collapse; background: url(images/img/back.jpg) repeat; background-attachment: fixed; background-color: #000000; padding: 20px 5px 0 5px;"
width="100%" id="table1" height="100%">
<tr>
<td width="100%" align="center" valign="top" height="150" colspan="3">
You might have to play with it a bit, but it should work.
Thanks Deni. First try didn't work as it's not calling the image.
I'll have a play with it later..
I just got over a bad case of Flu, I've not been out of the house for a week.
I neeeed out.. it's driving me screwy being stuck in the house.
if you mean the page background?
Then I dont believe you can over ride it from an article since that is set in the page CSS itself.
So you could have a background for the article itself...but not for the page...since the article is nested inside the page and treated as a table / div element
I've used the code below for articles and it worked OK... it's no longer in use on my site, but here's a demo.
Demo Article (http://www.mykimbrell.com/FamilyForum/index.php?page=55)
<div align="center">
<table border="0" cellpadding="0" style="border-collapse: collapse" width="100%" id="table1" height="8" background="IMAGE URL">
<tr>
<td width="90%" align="center" valign="top" height="150" colspan="3">
//INSERT ARTICLE HERE
</td>
</tr>
</table>
</div>
Well, it sort of worked.. the backgrounds is kinda fixed but it judders when scrolling the page. I don't think theres any way to make it smoother.
You can see the effect here:
http://labradio.co.uk/index.php?page=16 (has several YouTube Video's)
and here:
http://labradio.co.uk/index.php?page=14
I was going to use it on the Team Page as well, but thats PHP and I've no idea how to work it into PHP.
ZTN
If you are saying that the YouTube images are jumping around then it may just be that the issue is with the YouTube window/image because mine will do the same and I only use one image per page.
If you are refering to the background then I don't know what to say, except to give you my b/g image spec's to see if that might help you:
Size= 37483 bytes
Dim= 270 x 155
That image gives good coverage for any size window without any visable seams/breaks, or other unwanted effects.
You can see a copy if the image HERE (http://www.mykimbrell.com/images/canvas_1011.jpg)
Ps: I just looked at your pages using FireFox 1.5.0.0 & IE 7.0 and they both look good to me.
I'm not sure you quite understand what I'm getting at.
The Video's are fine, That was just an example Article.
If you look at the Background outside the forum frame, the forum floats over it, as the background is a fixed attachment in the .css
The code JPDeni posted does what I wanted it to. and that is to fix the background in the Article in the same way as the forum background.
It does now work, but it's not as smooth as the background outside the forum.
The best way I can get it to work is by scrolling with the up and down arrows on my keyboard.
Heres the forum background:
http://labradio.co.uk/Themes/Azure_Black_Final/images/img/back.jpg
Heres the Article background:
http://labradio.co.uk/st82.gif
Both images repeat perfectly.
ZTN
Sorry, thought you were responding to my post. :)
Quote from: ken.kimbrell on January 22, 2007, 04:03:53 PM
Sorry, thought you were responding to my post. :)
=] my bad.. I don't quote enough.
Well, as I said.. it sort of works ::)
I'll live with it. Thanks for everybody's help.
ZTN