News:

If you need instructions on how to get through the hotels, check out the enclosed instruction book.

Main Menu

Webdesign flaw: centering an object wider than your monitor

Farted by HeinekenClock, March 31, 2008, 02:09:54 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

HeinekenClock

So I made a splash screen for my website involving a very short intro movie followed by a fadeout and a line that grows to the edges of the screen.

I centered this flash vertically and horizontically by placing it inside a table, and the dimensions of the flash are 1440 by 300.

I took 1440 because that's my horizontal screen width, and that's about as wide as screens get (of course there's wider widescreens but you don't see them that often), and I assumed that because I centered it, it would appear centered on smaller monitors as well.

Sadly, the welcome text appears somewhere 2/3's on my less wide monitor so it hasn't worked.

How do you center something that is wider than the screen itself (aka it cuts off pixels from both sides rather than just the right side)?

PecanClock

If there isn't anything else on the splash page:

-Go into flash and change the actual dimensions to 800x600
-Fix your splash page so it looks good in 800x600
-Use CSS to remove all the margins in your and
-Add your flash to the site and make it 100% by 100%

Good to go.

AlbinoClock

If you have difficulties with resizing shit, don't forget about the action script camera.

Blue

[FLASH=http://files.myfrogbag.com/mupff0/snowflake.swf]width=670 height=200 quality=medium wmode=transparent[/FLASH]

Loki Clock

Put it in a div (don't ever use tables again or I'll fucking rape you) and use CSS to set that div's width to 100%.

As for aligning it, it seems you have to rig something up with the margins, because CSS supports the centering of the text of an element but not the element it's self, which can only be floated to the right or left. EDIT: It should center it if you set the left and right margins both to "auto".