img/table: space appears

  • Thread starter =?ISO-8859-1?Q?L=FCpher_Cypher?=
  • Start date
?

=?ISO-8859-1?Q?L=FCpher_Cypher?=

Hi,
I have the following code:

<img src="images/bg-temp.gif" class="logo" />
<table class="page" cellspacing="0" cellpadding="0">
<tr>
...
</tr>
</table>

And the following CSS:

table {
margin:0 0 0 0;
padding:0 0 0 0;
border:0;
}

img {
margin:0 0 0 0;
padding:0 0 0 0;
border:0;
}

img.logo {
width:698px;
height:100px;
border:1px solid #808080;
margin-top:12px;
}

table.page {
width:700px;
border:1px solid #808080;
background:#ffffff;
}

I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Thanks,
lüph
 
E

Els

Lüpher Cypher said:
Hi,
I have the following code:

[snip code]
I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y. To counter that, you can give the image
"vertical-align:bottom;" in the stylesheet, or "display:block;". Which
works for you depends on the rest of the code/elements.
 
L

Luigi Donatello Asero

Els said:
Lüpher Cypher said:
Hi,
I have the following code:

[snip code]
I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y.


What does "g,j,p,q,y." mean?


--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 
G

Guest

Thanks! I knew it would be something simple :)
Lüpher Cypher wrote:

Hi,
I have the following code:


[snip code]

I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?


Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y. To counter that, you can give the image
"vertical-align:bottom;" in the stylesheet, or "display:block;". Which
works for you depends on the rest of the code/elements.
 
G

Guest

g,j,p,q,y are the ones that go below the base line - the base line lies
at the bottom of such letters as a,h,v,b,etc.
Lüpher Cypher wrote:

Hi,
I have the following code:

[snip code]

I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y.



What does "g,j,p,q,y." mean?
 
B

Blinky the Shark

Luigi said:
Els said:
Lüpher Cypher said:
Hi,
I have the following code:

[snip code]
I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y.

What does "g,j,p,q,y." mean?

Letters with descenders.
 
L

Luigi Donatello Asero

Blinky the Shark said:
Luigi said:
Els said:
Lüpher Cypher wrote:

Hi,
I have the following code:

[snip code]

I figure the table should be aligned so that it is right under the
image. However, there appears to be about 4px space between the image
and table. Anyone knows why?

Images 'sit' on the same line as text, leaving space below for the
g,j,p,q,y.

What does "g,j,p,q,y." mean?

Letters with descenders.



Thank you.


--
Luigi Donatello Asero
(sono italiano ma vivo in Svezia)
(Ñ Ð¸Ñ‚Ð°Ð»ÑŒÑнец но Ñ Ð¶Ð¸Ð²Ñƒ в Швеции )
(我是 æ„大利人 , 但是 我 ä½ åœ¨ ç‘žå…¸)
(minä olen Italian kansalainen, mutta minä asun Ruotsissa)
https://www.scaiecat-spa-gigi.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top