Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2007
    Location
    Essex, United Kingdom
    Posts
    161
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Smile Positioning Flash Content

    Problem Is Now Fixed.

    i have recently started recoding my site in css, so far i have managed to:
    • background color - that was easy lol
    • position my header image horizontally in the center so when you change the size of the browser window it moves with it. one problem with this is making it so that its a certain percentage from the top of the screen.
    • position my navigation bar image in the same way. this is fine
    • i now need to include flash content, from reading up on this i understand that you cannot embed content in css so this would rule out css to do this, however is there any other way of horizontally aligning my flash content with my other images ?
    thanking you in advance

    James

    Problem Is Now Fixed.
    Last edited by CSSisthebest; 07-15-2007 at 10:27 PM. Reason: Problem Solved

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,932
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    You cannot embed Flash content with CSS, that’s true. You include it with the HTML object element. However, CSS is for styling HTML, so what you would do is style the object element. There are limited possibilities but you can define width, height, margins, and position, among others.

  • #3
    Regular Coder
    Join Date
    Jul 2007
    Location
    Essex, United Kingdom
    Posts
    161
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Question flash ?

    would this be how i would do it ?

    Code:
    <head>
    <style type="text/css">
    object {
              display: block;
              margin-left: auto;
                 margin-right: auto; 
              margin-top:0%
              }
    </style>
    </head>
    <body>
    <object class="normal" src=technolanebanner.swf width="800" height="66" title= "technolane flash banner" /> 
    </body>

  • #4
    Regular Coder
    Join Date
    Jul 2007
    Location
    Essex, United Kingdom
    Posts
    161
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Question any ideas ?

    does anyone know if the above code i have written would work ?

    thanks

    james

  • #5
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,932
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    Why don’t you test it and see whether or not it’s working? Technically nothing is wrong (except object requiring a closing tag) but I would need to test it as well to be totally sure.

    Always research for yourself before you ask and only ask if there are actual problems.

  • #6
    Regular Coder
    Join Date
    Jul 2007
    Location
    Essex, United Kingdom
    Posts
    161
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Smile Solved

    i solved the problem by doing the following:

    Code:
    <style type= "text/css">
    
        /* Flash Banner */         
        #flash {
            display:block;
            margin-left:auto;
            margin-right:auto;
            width:800px;    
            background:url(technolanebanner.swf); 
            
            }
    
    </style>
    </head>
    <body>
    <div id="flash"><embed src="technolanebanner.swf" wmode="transparent" width="800" height="180" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" title="flash banner"></embed>
    </body>
    this made the content inside the div tag move to auto center with the browser.


  •  

    Posting Permissions

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