TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,236
  • Total Topics: 21,353
  • Online today: 340
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 227
  • Total: 227

Fixing a Background Image in an Article

Started by Zetan, January 21, 2007, 03:00:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zetan

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

Lesmond

What are you trying to do? I have just run a test with this background on my site here is this what you want

Zetan

#2
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.

Lesmond

I dont think that can be done in a article, but someone may come along with a better idea

JPDeni

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.

Zetan

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.


akulion

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 

Ken.

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
<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>
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

Zetan

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

Ken.

#9
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

Ps: I just looked at your pages using FireFox 1.5.0.0 & IE 7.0 and they both look good to me.
" If everything seems under control, you're not going fast enough." - Mario Andretti
Yesterday When I was Young.

This website is proudly hosted on Crocweb Cloud Website Hosting.