Border around Flash Object Not showing

Posted on 2004-08-23
Last Modified: 2011-10-03
Ive embedded a flash movie into my html as follows:

<object id="flash1" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,29,0" width="160" height="198">
        <param name="movie" value="images/welcome.swf">
        <param name="quality" value="high">
        <embed src="images/welcome.swf" quality="high" pluginspage="" type="application/x-shockwave-flash" width="160" height="198"></embed></object>

Ive then created a style in css which is id="flash1" as follows:

#flash1 { border-top: 0.1em solid #FF66CC;
            border-left: 0.1em solid #FF66CC;

The actual cell where this goes has a css style to:

.corner {height: 200px;
             text-align: right;
             vertical-align: bottom;

In IE6 and even opera 5 the flash objects butts up with the corner of the table. But in Mozilla and Netscape the flash object is raised by one pixel from the bottom of the cell and the border does not appear at all ? Ive tried making the border even bigger but to no avail !!

Any help would be nice. thanks.
Question by:Eternal_Student
  • 3
  • 2
  • 2
  • +2
LVL 11

Expert Comment

ID: 11869017
Maybe if you put it inside a DIV.
And border that DIV....

shorthand code would be:

<div style="border: 1px solid #000; padding: 5px;">
LVL 11

Expert Comment

ID: 11869019
btw padding is optional - i just added it for some spacing....
LVL 18

Author Comment

ID: 11869065
The thing is I dont really care if the border doesn't show up on the browsers I mentioned above, but I just want the flash object to be vertically aligned to the bottom of the cell, but for some reason its not ?
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.


Expert Comment

ID: 11869080
You should set a one-cell table and set its border-collapse property to COLLAPSE and then set the border you want to that cell, You can't set a CSS style for a <embed> tag.
LVL 18

Author Comment

ID: 11869761
ahh that is why i am having problems then !!

thanks Ehsun
LVL 11

Expert Comment

ID: 11869923
Awww so its not the border - its the 1px spacing?

Try removing the MARGIN on everything you can...

Try on the embed and the cell....
Remove CELLPADDING and set the STYLE="padding: 0;"

thats probably all you can do now!
LVL 31

Accepted Solution

seanpowell earned 30 total points
ID: 11872577
Chances are the issue you're seeing is caused by the default font size applied to the object.
You can remove it just by adjusting it's display by applying CSS to the embed tag, as an example:

<style type="text/css">

      margin: 0;
      padding: 0;

      border-top: 4px solid #FF66CC;
      border-left: 4px solid #FF66CC;

      text-align: right;
      vertical-align: bottom;


<table cellpadding="0" cellspacing="0">
            <td class="corner" id="flash">
            <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
            codebase=",0,29,0" width="160" height="198">
            <param name="movie" value="images/welcome.swf">
            <param name="quality" value="high">
            <embed style="display:block;" src="images/welcome.swf" quality="high"
            pluginspage="" type="application/x-shockwave-flash" width="160" height="198"></embed>



Expert Comment

ID: 11883609
First off, read

Bug 236089: <embed>, <object> does not draw CSS borders when embedding plugin

So wrapping a div around your flash object is probably the best solution.
LVL 31

Expert Comment

ID: 11883901
I think we covered that, but thanks for the bug link :-)

Part of the problem is likely because of the default line-hiehgt, and hence the need for this:
<embed style="display:block;" .....

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem with a CSS in a page 2 30
Make navigation bar highlight the page you are on. 1 18
Changing alignment and creating border 6 27
Changing Color of Page Section 4 21
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now