Welcome to WebmasterWorld Guest from 220.127.116.11
Forum Moderators: open
Issue: I'm creating a website in Dreamweaver MX 2004. I want the background image to be centered in the user's window, so I just placed the image in a table and made the table width 100%.
Now, I want to add scrolling text over a certain area of that image, but I can't seem to get it to work right. I added some code for the scrolling text that I want, but when I just added it in a layer above the image, when I resize the window, the text doesn't stay where I want it to in line with the image.
So, I then tried to just insert another table for the scrolling text, but it won't let me add the table on TOP of the static image. So, I tried making the image a background in the parent table so I could nest the scrolling text table in it. But, then the background image repeats to the right and the bottom in the browser window.
I want the background image to be centered on the user's screen, and I want scrolling text in one portion of that image.
What's the best way to do that, so that the scrolling text moves with the image when the user resizes their window?
Could I create the image in Flash to do it?
[edited by: WendyJo at 5:02 pm (utc) on Dec. 18, 2007]
Using percentage for your table will resize the table for different screen resolutions, but it won't resize the image. If you have the image background set to tile, you'll get those repetitions when it doesn't fill the table (that is, when the table resizes but the image doesn't). Like I said, I'm not familiar with Dreamweaver - does it give you any other options besides tiling to fill the background? Center or stretch might work, if they're available.
But if I were trying to do what you're trying to do, I wouldn't mess with nested tables until I'd tried some other things. I'd use margin settings to keep the text where I wanted it, not another table.
One of the nice things about text when you're dealing with screen resolutions is that if left without hard returns it'll wrap to fit whichever resolution is being used. In your case, though, this would mean your text and your table probably mesh quite well with each other - but not with the image. That's probably the reason that the text gets out of line with the image when you change window size. The text wraps to fit the larger window, but the image is static.
One suggestion (that will probably sound prehistoric) is to give the table an absolute width instead of a percentage. Set it so it looks its best at the screen resolution most of your visitors use, then check it in other resolutions to make sure it's at least useable in them. Then you can size your image to fit the table and you won't have the problem of the table resizing so the image no longer fits correctly. Then set the margins for the scrolling text. -- If someone knows a way to do it in flash, that would be much more modern!