SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    May 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Moving with the browser

    Please take a gander at www.pacificbulletproof.com/adam_new/

    Notice the flash at the top. If your browser is full screen, it will look ok, but if you shrink the browser, the flash floats to the right, making it not align with the rest of the page. How can I resolve this.

    Div for that is #flash

    CSS is at www.pacificbulletproof.com/adam_new/styles.css

    Thanks!

    - Adam

  2. #2
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Adam. The problem here is caused by the fact that you used absolute position to center the flash movie at the higher resolution, so if the user is in another resolution, the alignment would be different. The fix here is to alter your css class for the flash. There are two options:

    Code:
    .flash {
    	width: 775px;
    	height: 123px;
            margin: auto;
    }
    Code:
    .flash {
    	width: 775px;
    	height: 123px;
    	position: absolute;
    	left: 50%
    	top: 63px;
            margin-left: -388px;
    }
    The first one is the more preferable one, which sets the margin automatically for you, by default this 'auto' centers the div for you. The second solution is to manually set it to the center by using the absolute position. Note how I used it.

    PS: I've noticed that you used table for layout, try for a complete css layout next time. And also, there is no such thing as float: center; good luck!
    In search of the clouds...and maybe some work

  3. #3
    SitePoint Member
    Join Date
    May 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks dude...I appreciate it.

    I'm still trying get a handle on CSS. I've only done one full CSS site. My problem is the planning. I really need to think and plan before I start a full CSS site. I'm still comfortable that nothing will jolt a table from moving.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •