Forums
This topic is locked
dynamic positioning and scaling
Posted 07 Apr 2005 21:19:53
1
has voted
07 Apr 2005 21:19:53 Joel Stransky posted:
I'm building a pretty simple site that is just a 1 row x 1 col table called 'mainTable' with a tiling background image applied to it. Also, centered vertically in the table is a flash movie. I need mainTable to stretch to 100% of the available height of the browser window so that its background tile separates the window into 3 columns. I also need the flash movie to be centered from top to bottom. I can force this look with spacer.gif's but it doesnt allow for dynamic placement. How do I do this?
Even if I was confusing, please respond so that I may attempt to clarify.
Replies
Replied 07 Apr 2005 22:06:18
07 Apr 2005 22:06:18 Joel Stransky replied:
ok I sorta got this working using javascript. I just called a funciton onLoad that set mainTables height to screen.availHeight. This isn't that pretty because I actually want to set it to window.innerHeight but I don't think you can get that property, only set it. It doesnt work in firefox at all so I'd perfer a less technical approach. If somehow I could set the height of a couple spacer.gif's onResize based on window.innerHeight that would do the trick. Any ideas?
Replied 08 Apr 2005 19:15:01
08 Apr 2005 19:15:01 Dan Berdusco replied:
You could just set your table height to 100% in the properties, and then center the table cell both vertically and horizontally. BUT, the trick to having the table actually display as 100% height is to remove the line of code (ussually line 1 or 2) that says:
<pre id=code><font face=courier size=2 id=code><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "www.w3.org/TR/html4/loose.dtd"> </font id=code></pre id=code>
(there is a small possibility that this may cause some problems depending on what you have on your page - it isn't a problem 99% of the time)
This would be much simpler that using the javascript.
Hope that is what you were looking for.
<pre id=code><font face=courier size=2 id=code><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "www.w3.org/TR/html4/loose.dtd"> </font id=code></pre id=code>
(there is a small possibility that this may cause some problems depending on what you have on your page - it isn't a problem 99% of the time)
This would be much simpler that using the javascript.
Hope that is what you were looking for.
Replied 09 Apr 2005 03:09:23
09 Apr 2005 03:09:23 Joel Stransky replied:
oh man thanks so much. Havnt tried it yet but that sounds like it will work. I always wondered about that line, I'm semi-new to html so I just let DW write that line for me. If you would be so kind as to elaborate. What is it exactly and how is is safe to exclude it?
[size=1]and to think I was about to come here and flame for not getting any responses <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>[/size]
[size=1]and to think I was about to come here and flame for not getting any responses <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>[/size]
Replied 09 Apr 2005 03:12:47
09 Apr 2005 03:12:47 Joel Stransky replied:
booya! that did it.
Replied 09 Apr 2005 05:56:49
09 Apr 2005 05:56:49 Dan Berdusco replied:
To tell you the truth, I am not even really sure what purpose it has. I think it might have something to do with making sure the page is compiant with the majority of browsers????????????
Anyone know what it is for?
Anyone know what it is for?
Replied 09 Apr 2005 10:10:29
09 Apr 2005 10:10:29 Dave Thomas replied:
removing the doctype will throw IE into whats called "quirks mode" and it will not follow standards.
they are needed if you want to validate your page code.
good little discussion about it here.
www.alistapart.com/discuss/doctype/6/
regards
Dave Thomas
<b>DMX Zone Manager</b>
they are needed if you want to validate your page code.
good little discussion about it here.
www.alistapart.com/discuss/doctype/6/
regards
Dave Thomas
<b>DMX Zone Manager</b>