SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot phillipus_rex's Avatar
    Join Date
    Jan 2007
    Location
    Silicon Holler
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Stubborn Div Won't Listen

    Hey guys and gals,

    Having a problem on a website that I'm working on.

    Here is the site: Click Here. You will need to look at the Projects page.

    I have a flash element within a <div> container that is absolutely positioned under my navigation. I am trying to align it under the navigation bar like the rest of the site, but when I apply margins or padding it is ignored and the flash <div> ends up sticking to the left no matter what I do. It does this in IE and FF.

    Here is the CSS:

    #project_flash_box {
    position: absolute;
    top: 167px;
    width: 949px;
    height: 402px;
    margin-top: 100px;
    left: 102px;
    margin-left: 20px;

    Any ideas?
    "Be kind, for everyone you meet is fighting a
    hard battle." -Plato

  2. #2
    SitePoint Guru
    Join Date
    Nov 2005
    Location
    Norway
    Posts
    715
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Move all this code inside the <div id="project_flash_box">
    Code:
    <script language="javascript">
    	if (AC_FL_RunContent == 0) {
    		alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
    	} else {
    		AC_FL_RunContent(
    			'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0',
    			'width', '950',
    			'height', '400',
    			'src', 'projects_flash',
    			'quality', 'high',
    			'pluginspage', 'https://www.macromedia.com/go/getflashplayer',
    			'align', 'middle',
    			'play', 'true',
    			'loop', 'true',
    			'scale', 'showall',
    			'wmode', 'window',
    			'devicefont', 'false',
    			'id', 'projects_flash',
    			'bgcolor', '#ffffff',
    			'name', 'projects_flash',
    			'menu', 'true',
    			'allowScriptAccess','sameDomain',
    			'movie', 'projects_flash',
    			'salign', ''
    			); //end AC code
    	}
    </script><object codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="projects_flash" name="projects_flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" align="middle" height="400" width="950"><param name="movie" value="projects_flash.swf"> <param name="quality" value="high"> <param name="play" value="true"> <param name="loop" value="true"> <param name="scale" value="showall"> <param name="wmode" value="window"> <param name="devicefont" value="false"> <param name="bgcolor" value="#ffffff"> <param name="menu" value="true"> <param name="allowScriptAccess" value="sameDomain"> <param name="salign" value=""> <embed src="projects_files/projects_flash.swf" quality="high" pluginspage="https://www.macromedia.com/go/getflashplayer" play="true" loop="true" scale="showall" wmode="window" devicefont="false" id="projects_flash" bgcolor="#ffffff" name="projects_flash" menu="true" allowscriptaccess="sameDomain" salign="" type="application/x-shockwave-flash" align="middle" height="400" width="950"></object>

  3. #3
    SitePoint Zealot phillipus_rex's Avatar
    Join Date
    Jan 2007
    Location
    Silicon Holler
    Posts
    184
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome!

    Thanks a lot Frederick... worked like a charm.

    I didn't realize the javascript also had to go inside the div ... now I do.

    "Be kind, for everyone you meet is fighting a
    hard battle." -Plato


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
  •