By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Padding between Flash and Image

P: n/a
Hello

Here is my code:

<div>
<span>
... Flash object...
</span>
<span>
<img src="a.gif">
</span>
<span>
<table>
<tr>
<td>asdasd</td>
</tr>
</table>
</span>
</div>

All the above divs and spans have been assigned the following using a CSS

margin:0px 0px 0px 0px
padding:0px 0px 0px 0px
border-width:0px;

Still there is a padding between the flash and the image and the table. Can
someone point where I am going wrong?

Thank You
Jul 20 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a

"Paul McKenna" <pm**********@yahoo.com> wrote in message
news:f7**************************@posting.google.c om...
Hello

Here is my code:

<div>
<span>
... Flash object...
</span>
<span>
<img src="a.gif">
</span>
<span>
<table>
<tr>
<td>asdasd</td>
</tr>
</table>
</span>
</div>

All the above divs and spans have been assigned the following using a CSS

margin:0px 0px 0px 0px
padding:0px 0px 0px 0px
border-width:0px;

Still there is a padding between the flash and the image and the table. Can someone point where I am going wrong?


If you have the following in your web page, on two lines as shown, what
would you expect to see?

<p>Today is the first day
of the rest of your life.</p>

Hopefully you'd expect to see a space between "day" and "of".

Now compare this code with yours.

Jul 20 '05 #2

P: n/a
On 7 Jun 2004 13:04:28 -0700, Paul McKenna <pm**********@yahoo.com> wrote:
Hello

Here is my code:

<div>
<span>
... Flash object...
</span>
<span>
<img src="a.gif">
</span>
<span>
<table>
<tr>
<td>asdasd</td>
</tr>
</table>
</span>
</div>
Span is an inline element, so it cannot contain block level elements like
table. I'm not sure if any browsers have trouble with inline block
elements like object within inline elements.
All the above divs and spans have been assigned the following using a CSS

margin:0px 0px 0px 0px
padding:0px 0px 0px 0px
border-width:0px;
No need to set units for 0 distances.

margin: 0; padding: 0, border-width: 0;
Still there is a padding between the flash and the image and the table.
Can
someone point where I am going wrong?


I don't see why you even need spans here. Eliminate them, or replace with
divs.
Jul 20 '05 #3

P: n/a
On 7 Jun 2004 13:04:28 -0700, pm**********@yahoo.com (Paul McKenna)
wrote:
Hello
Here is my code:
<div> ... etc ...


If I may be so blunt as to try to set your interest to this little nifty
on-line tool?

http://jigsaw.w3.org/css-validator/

--
Rex
Jul 20 '05 #4

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<2i************@uni-berlin.de>...
If you have the following in your web page, on two lines as shown, what
would you expect to see?

<p>Today is the first day
of the rest of your life.</p>

Hopefully you'd expect to see a space between "day" and "of".

Now compare this code with yours.


I didnt quite get what you meant? Could you please elaborate...
Jul 20 '05 #5

P: n/a
pm**********@yahoo.com (Paul McKenna) wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<2i************@uni-berlin.de>...
If you have the following in your web page, on two lines as shown, what
would you expect to see?

<p>Today is the first day
of the rest of your life.</p>

Hopefully you'd expect to see a space between "day" and "of".

Now compare this code with yours.


I didnt quite get what you meant? Could you please elaborate...


Your spans are all separated by line breaks, just like my sample code
above. You're complaining that there's a space between your spans. If
you expect to see such a space in my example, then you should expect
to see such a space in yours, for the same reason. If you're surprised
to see a space on your page, wouldn't you expect my code to display as

Today is the first dayof the rest of your life.

?

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #6

P: n/a
Actually, I wasn't even reading your code properly. It isn't valid in the
first place. SPAN tags can only go around inline code, not around blocks. If
your browser is accepting the code and displaying the page, then it's
probably displaying the blocks vertically as though the SPAN tags weren't
there, and you're talking about *vertical* spacing. (I was talking about
horizontal spacing.) But there's no point in my taking time guessing what
your browser is doing with invalid code. Make it valid first, then see what
happens.

Jul 20 '05 #7

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<2i************@uni-berlin.de>...
Make it valid first, then see what
happens.


It is valid, the CSS validator found no fault with the CSS. However
the html portion did have the error as pointed out. I have rectified
it and got the appropriate layout. Thanks to everyone for helping out
Jul 20 '05 #8

P: n/a
pm**********@yahoo.com (Paul McKenna) wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<2i************@uni-berlin.de>...
Make it valid first, then see what
happens.
It is valid, the CSS validator found no fault with the CSS.


Since I was talking about your HTML and not your CSS, what the CSS
validator found is irrelevant.
However
the html portion did have the error as pointed out.
In other words, it was invalid, as I said. So why did you bring up the
CSS validator?
I have rectified
it and got the appropriate layout. Thanks to everyone for helping out

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #9

P: n/a
On 9 Jun 2004 19:33:02 -0700, Paul McKenna <pm**********@yahoo.com> wrote:
"Harlan Messinger" <h.*********@comcast.net> wrote in message
news:<2i************@uni-berlin.de>...
Make it valid first, then see what
happens.


It is valid, the CSS validator found no fault with the CSS. However
the html portion did have the error as pointed out. I have rectified
it and got the appropriate layout. Thanks to everyone for helping out


If the HTML is not valid, the CSS is immaterial. Always, always, get the
HTML valid first before even worrying about the CSS.
Jul 20 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.