473,388 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Create a cell of height 1px

I want a row/cell of 1px height. This is what I have tried to achieve
that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>

However, the row does take more than 1px. I have tried resizing the
image even smaller, but in vain. Where am I going wrong?
Any advice and suggestions will be greatly appreciated.

Regards,
Rithish.
Jul 23 '05 #1
8 11776
ri*****@gmail.com (Rithish Saralaya) wrote:
I want a row/cell of 1px height. This is what I have tried to achieve
that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>

However, the row does take more than 1px. I have tried resizing the
image even smaller, but in vain. Where am I going wrong?


You are abusing markup to do layouts, use css, Google to get up to speed
with it.

--
Spartanicus
Jul 23 '05 #2

"Rithish Saralaya" <ri*****@gmail.com> wrote in message
news:68**************************@posting.google.c om...
I want a row/cell of 1px height. This is what I have tried to achieve
that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>

However, the row does take more than 1px. I have tried resizing the
image even smaller, but in vain. Where am I going wrong?
Any advice and suggestions will be greatly appreciated.

Regards,
Rithish.


My my my. That certainly doesn't look like tabular data to me...

-Karl
Jul 23 '05 #3
ri*****@gmail.com (Rithish Saralaya) wrote:
I want a row/cell of 1px height.
Stop wanting that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>
Post a URL, not an incorrect snippet of code.
However, the row does take more than 1px.
There are 42 possible reasons to that. The most probable is perhaps that
you have a positive value for cellspacing (perhaps by browser defaults).
Where am I going wrong?


You are not telling what you are really aiming at, you are not posting
the URL, you are using tables for layout pointlessly, and you are using
invalid markup.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #4
In article <68**************************@posting.google.com >,
ri*****@gmail.com (Rithish Saralaya) wrote:
I want a row/cell of 1px height. However, the row does take more than 1px.


http://www.mozilla.org/docs/web-developer/faq.html#gaps

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 23 '05 #5
"Jukka K. Korpela" wrote
I want a row/cell of 1px height.


Stop wanting that.


Egads !!! I must have stirred a hornet's nest !! :o) I did not want
to burden all with the whole complexity of whatever problem I am
facing. But now, since all seem to be interested, here goes... I want
to create a custom toolbar with vertical drop-down menus ( Please
don't question as to why I am reinventing the wheel again.. I am
not... A drop-down menu is one among many of the functions required of
the toolbar ) I want to mark a seperator between individual items of
the menu ( The menu is a table with items as rows of it, each row
containing a single cell ). The seperator row/cell will have no text
in it, but a bottom border, thus emulating a seperator line. I thought
setting <TD>&nbsp;</TD> with the 'Font-Size' style to 1px would be
incorrect. Hence, the reason I opted to use an image ( albeit a very
small one, of height 1px ). How am I wrong in wanting a row/cell of
1px height? Please... I would be glad to be enlightened...
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>


Post a URL, not an incorrect snippet of code.


If I were able to post a URL, I would have ( I am working in a
restricted environment ). How incorrect is the snippet?

However, the row does take more than 1px.


There are 42 possible reasons to that. The most probable is perhaps that
you have a positive value for cellspacing (perhaps by browser defaults).


I agree. I found the reason soon as I posted my query. Actually, it
was reason no 41. :o) I had a positive value for cellpadding.
Where am I going wrong?


You are not telling what you are really aiming at, you are not posting
the URL, you are using tables for layout pointlessly, and you are using
invalid markup.


Think I have satisfied all troubled minds... I am yet a novice at
this. I apologize for being so naive...

Regards,
Rithish.
Jul 23 '05 #6
ri*****@gmail.com (Rithish Saralaya) wrote:
I must have stirred a hornet's nest !!
Welcome to Usenet.
"Get real! This is a discussion group[,] not a helpdesk. You post
something[,] we discuss it's implications. If the discussion happens to
answer a question you've asked[,] that's incidental."
nobull, 2000-10-25 in comp.lang.perl.misc
I did not want
to burden all with the whole complexity of whatever problem I am
facing.
Oh, but we love to do just that.
I want
to create a custom toolbar with vertical drop-down menus
Stop wanting that, too.
( Please
don't question as to why I am reinventing the wheel again..
I'm not. I'm simply stating the fact that you are doing the wrong thing,
and probably the wrong way too.
> <TR><TD><IMG HEIGHT=1
> SRC='http://myserver.com/blank-small.gif'></TD></TR>


Post a URL, not an incorrect snippet of code.


If I were able to post a URL, I would have ( I am working in a
restricted environment ).


Which part of the term "www" do you fail to understand?
How incorrect is the snippet?
Very incorrect, starting from being invalid, accessibility-hostile, and
pointless.
Think I have satisfied all troubled minds...
Not really. And your basic problems remain, but after all, it's you and
your users that need to live with them, not most of us.
I apologize for being so naive...


Not really. A naive man would have told directly what he is doing and
how.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #7
this is what I do when I need very thin rows (or very narrow cells):

in css I define:

..spacer {font-size:1px}

then in table:

<tr><td class="spacer" height=1>&nbsp;</td></tr>

or

<tr><td class="spacer" width=1>&nbsp;</td></tr>
hope this helps... Frances
Rithish Saralaya wrote:
I want a row/cell of 1px height. This is what I have tried to achieve
that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>

However, the row does take more than 1px. I have tried resizing the
image even smaller, but in vain. Where am I going wrong?
Any advice and suggestions will be greatly appreciated.

Regards,
Rithish.


Jul 23 '05 #8
Well, because you are not using the XHTML standard, so it doesn't work!
Sorry, It's a joke!

"Rithish Saralaya" <ri*****@gmail.com> ?????
news:68**************************@posting.google.c om...
I want a row/cell of 1px height. This is what I have tried to achieve
that.
<TR><TD><IMG HEIGHT=1
SRC='http://myserver.com/blank-small.gif'></TD></TR>

However, the row does take more than 1px. I have tried resizing the
image even smaller, but in vain. Where am I going wrong?
Any advice and suggestions will be greatly appreciated.

Regards,
Rithish.

Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: chepiok | last post by:
I have a very basic table with a fixed height of 40 pixels that contains an image of 40 pixels height. Works on mozilla, forebird, konkeror, safari. The problem is that on IE6 PC, WinXP SR1, the...
3
by: Mike Mimic | last post by:
Hi! I noticed that for the following code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html...
0
by: Brian | last post by:
Ugghh.. The page designer keeps placing "height" attributes in my "TD" tags. Why does it do this? Does Visual Studio not know that height in HTML tables is determined by the contents? ...
0
by: JJ | last post by:
Hi All, I have been experimenting with column styles for an application that I am developing that uses a datagrid. However, some of the cells can contain a large amount of text and I would...
0
by: gferris | last post by:
Hello, I am having an issue with a table that I cannot quite figure out. I have a two-column table with the left column comprising of 4 cells and the right column comprising of one cell with a...
6
by: jslaybaugh | last post by:
I'm working on an ASP.NET 2.0 application and am having trouble with a very simple table layout. Using ASP.NET 2.0 it defaults to XHTML 1.0 Transitional and I am trying to comply. However, I...
0
by: Markus Olderdissen | last post by:
i want to create my page with 100% height. <table height="100%"works but is not correct by default. i saw various information how to do it with stylesheet. i really have problems to create my page....
4
by: estragon | last post by:
I am trying to put a transparent gif on top of a jpg, both inside a table cell. Here is the code: <table width="600" border="0" cellpadding="0" cellspacing="0" bgcolor="#121663"> <tr> ...
2
by: Krshna | last post by:
I have a HTML table where I display records from database. Here's an example cell value: <td align="left" style="width:11%;height:1%;font-weight:bold;font-family:Arial; font-size:80%;" ><c:out...
1
by: Devin Allen | last post by:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content;...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.