Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Simple HTML question

Reply
Thread Tools

Simple HTML question

 
 
Lei Wu
Guest
Posts: n/a
 
      04-26-2004
Hi, guys,

As an Internet developer for many years, I thought I knew HTML...
until I came across this:

The following two tables look different in IE 6.0. I've pinpointed the
cause -- the hard return between the <img> tag and the </td> tag. I
thought hard returns don't make a differnt unless in <pre> tags, but
apparently I was wrong.

<table cellpadding="0" cellspacing="0" border="1">
<tr>
<td>
<img src="http://www.ccnmatthews.com/images/red_dot.gif"
height="6" width="10" border="0">
</td>
</tr>
</table>

<p>&nbsp;</p>

<table cellspacing="0" cellpadding="0" border="1" >
<tr>
<td>
<img src="http://www.ccnmatthews.com/images/red_dot.gif" height="6"
width="10" border="0"></td>
</tr>
</table>

My problem is, because my HTML is generated from Xsl.XslTransform,
there are hard returns after the image tag within the table cell. But
I want it to look like the second table.

Can somebody help me out? Thank you.

By the way, Netscape 7.01 gives the same result. However, in Opera
7.23 the two tables look the same, which is my desired result.

Lei
 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      04-26-2004
Try removing the hard return. You might also set the image to display:block;
to try getting rid of anyother whitespace that doesnt. Certain whitepsace is
"supposed" to be there because images are inline-block by default iirc. Its
explained on the w3c in some abnormal inhumane way


"Lei Wu" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> Hi, guys,
>
> As an Internet developer for many years, I thought I knew HTML...
> until I came across this:
>
> The following two tables look different in IE 6.0. I've pinpointed the
> cause -- the hard return between the <img> tag and the </td> tag. I
> thought hard returns don't make a differnt unless in <pre> tags, but
> apparently I was wrong.
>
> <table cellpadding="0" cellspacing="0" border="1">
> <tr>
> <td>
> <img src="http://www.ccnmatthews.com/images/red_dot.gif"
> height="6" width="10" border="0">
> </td>
> </tr>
> </table>
>
> <p>&nbsp;</p>
>
> <table cellspacing="0" cellpadding="0" border="1" >
> <tr>
> <td>
> <img src="http://www.ccnmatthews.com/images/red_dot.gif" height="6"
> width="10" border="0"></td>
> </tr>
> </table>
>
> My problem is, because my HTML is generated from Xsl.XslTransform,
> there are hard returns after the image tag within the table cell. But
> I want it to look like the second table.
>
> Can somebody help me out? Thank you.
>
> By the way, Netscape 7.01 gives the same result. However, in Opera
> 7.23 the two tables look the same, which is my desired result.
>
> Lei



 
Reply With Quote
 
 
 
 
Lei Wu
Guest
Posts: n/a
 
      04-26-2004
Setting img to display:block works. Thanks a lot!

I could return the hard returns, but display:block is definitely much more elegant.

Lei

<(E-Mail Removed)> wrote in message news:<(E-Mail Removed)>...
> Try removing the hard return. You might also set the image to display:block;
> to try getting rid of anyother whitespace that doesnt. Certain whitepsace is
> "supposed" to be there because images are inline-block by default iirc. Its
> explained on the w3c in some abnormal inhumane way
>
>
> "Lei Wu" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) om...
> > Hi, guys,
> >
> > As an Internet developer for many years, I thought I knew HTML...
> > until I came across this:
> >
> > The following two tables look different in IE 6.0. I've pinpointed the
> > cause -- the hard return between the <img> tag and the </td> tag. I
> > thought hard returns don't make a differnt unless in <pre> tags, but
> > apparently I was wrong.
> >
> > <table cellpadding="0" cellspacing="0" border="1">
> > <tr>
> > <td>
> > <img src="http://www.ccnmatthews.com/images/red_dot.gif"
> > height="6" width="10" border="0">
> > </td>
> > </tr>
> > </table>
> >
> > <p>&nbsp;</p>
> >
> > <table cellspacing="0" cellpadding="0" border="1" >
> > <tr>
> > <td>
> > <img src="http://www.ccnmatthews.com/images/red_dot.gif" height="6"
> > width="10" border="0"></td>
> > </tr>
> > </table>
> >
> > My problem is, because my HTML is generated from Xsl.XslTransform,
> > there are hard returns after the image tag within the table cell. But
> > I want it to look like the second table.
> >
> > Can somebody help me out? Thank you.
> >
> > By the way, Netscape 7.01 gives the same result. However, in Opera
> > 7.23 the two tables look the same, which is my desired result.
> >
> > Lei

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
firefox html, my downloaded html and firebug html different? Adam Akhtar Ruby 9 08-16-2008 07:55 PM
How to call a simple perl script from HTML without need of HTTPS but simple HTTP ? Wladimir Borsov Perl Misc 4 05-11-2006 09:29 AM
simple one..... from HTML to SQL to HTML... i lose my new lines Justin Rich ASP .Net 2 06-15-2005 12:43 PM
Re: Simple Simple question!!! Kevin Spencer ASP .Net 0 06-25-2004 05:25 PM
Re: Simple Simple question!!! ashelley@inlandkwpp.com ASP .Net 0 06-25-2004 04:18 PM



Advertisments