Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ansari

macrumors newbie
Original poster
Jun 6, 2008
17
0
Cambridge, Ontario
I've inherited maintenance duties on a flash site that was developed to be 1200px wide by 800px high. Needless to say, it goes off screen for many users and incurs unwanted scrollbars. With the design of the site, it wouldn't harm it should it become cutoff an all four sides.

I will be centering the flash file vertically and horizontally via css. My question is, is there a way I can modify the page to allow the flash file to go off the page without bringing on the scrollbars?
 

Ansari

macrumors newbie
Original poster
Jun 6, 2008
17
0
Cambridge, Ontario
That is the exact same thing I had tried originally. My problem was keeping the flash animation centered vertically and horizontally. Also with that method, it still brings on a vertical scrollbar when the window is too small for the animation.
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
That is the exact same thing I had tried originally. My problem was keeping the flash animation centered vertically and horizontally. Also with that method, it still brings on a vertical scrollbar when the window is too small for the animation.

You can also try overflow-y: hidden;
 

Ansari

macrumors newbie
Original poster
Jun 6, 2008
17
0
Cambridge, Ontario
OK here is the solution I came up with by playing around. Haven't tested it in all browsers just yet but so far so good in Firefox. If anyone can think of a better way of doing it, please share.

Code:
body {
background-image: url(BG_blank.jpg);
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}

#container {
width: 100%;
height: 100%;
overflow: hidden;
position:absolute;
left: 0;
top: 0;
}

#flash {
position:absolute;
top: 50%;
left: 50%;
width: 1200px;
height: 800px;
margin-left: -600px;
margin-top: -400px;
}

HTML:
<body>


<div id="container">


<div id="flash">
[1200x800px flash file in here]
</div>

</div>


</body>
 

angelneo

macrumors 68000
Jun 13, 2004
1,541
0
afk
OK here is the solution I came up with by playing around. Haven't tested it in all browsers just yet but so far so good in Firefox. If anyone can think of a better way of doing it, please share.

Code:
body {
background-image: url(BG_blank.jpg);
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}

#container {
width: 100%;
height: 100%;
overflow: hidden;
position:absolute;
left: 0;
top: 0;
}

#flash {
position:absolute;
top: 50%;
left: 50%;
width: 1200px;
height: 800px;
margin-left: -600px;
margin-top: -400px;
}

HTML:
<body>


<div id="container">


<div id="flash">
[1200x800px flash file in here]
</div>

</div>


</body>

Personally, I'm not a big fan of absolute positioning, you might want to reconsider that if you require your flash element to be position vertically and horizontally centered.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.