473,385 Members | 1,930 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,385 software developers and data experts.

td {width: 20px}

---------------
<style>
td.left {width: 20px; background-image: url(left_tab.png)}
td.m {background-image: url(middle_tab.png)}
td.right {width: 20px; background-image: url(right_tab.png)}
</style>
---------------
In IE following html works fine and td.left & td.right has width 20 pixels.
In Mozilla td.left & td.right dissapear (because they don't have contents)
What I can do for width in Mozilla? I want exactly 20 pixels width
---------------
<table><tr>
<td class=left><td class=m>Tab1<td class=right>
</tr></table>
---------------
Jul 20 '05 #1
4 6377
"<- Chameleon ->" <ch******@hotmail.NOSPAM.com> wrote in message
news:bl**********@nic.grnet.gr...
---------------
<style>
td.left {width: 20px; background-image: url(left_tab.png)}
td.m {background-image: url(middle_tab.png)}
td.right {width: 20px; background-image: url(right_tab.png)}
</style>
---------------
In IE following html works fine and td.left & td.right has width 20 pixels. In Mozilla td.left & td.right dissapear (because they don't have contents)
What I can do for width in Mozilla? I want exactly 20 pixels width
---------------
<table><tr>
<td class=left><td class=m>Tab1<td class=right>
</tr></table>
---------------


Perhaps try including &nbsp; in the empty cells? As in:
<table><tr>
<td class="left">&nbsp;</td>
<td class="m">Tab1</td>
<td class="right">&nbsp;</td>
</tr></table>

HTH.
-Peter Foti

Jul 20 '05 #2
"<- Chameleon ->" <ch******@hotmail.com> wrote:
---------------
<style>
td.left {width: 20px; background-image: url(left_tab.png)}
td.m {background-image: url(middle_tab.png)}
td.right {width: 20px; background-image: url(right_tab.png)}
</style>
---------------
In IE following html works fine and td.left & td.right has width 20 pixels.
In Mozilla td.left & td.right dissapear (because they don't have contents)
What I can do for width in Mozilla? I want exactly 20 pixels width
---------------
<table><tr>
<td class=left><td class=m>Tab1<td class=right>
</tr></table>
---------------


That doesn't look much like a table to me. Are you sure that there
isn't some other markup that more accurately describes your content?
This may help:
http://www.complexspiral.com/publica...rounding-tabs/

Anyway,

table { empty-cells: show;}

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
In article <bl**********@nic.grnet.gr>, <- Chameleon -> wrote:
In IE following html works fine and td.left & td.right has width 20 pixels.
In Mozilla td.left & td.right dissapear (because they don't have contents)
What I can do for width in Mozilla? I want exactly 20 pixels width


min-width: 20px; max-width: 20px; ???

nhoJ
--
John P Baker
Jul 20 '05 #4
In article <bl**********@nic.grnet.gr> in
comp.infosystems.www.authoring.stylesheets, <- Chameleon ->
<ch******@hotmail.com> wrote:
In IE following html works fine and td.left & td.right has width 20 pixels.
In Mozilla td.left & td.right dissapear (because they don't have contents)
What I can do for width in Mozilla?
Give them content, even if it's only &nbsp; -- or look into border
properties in CSS.
I want exactly 20 pixels width


No, you don't. If you had 20 pixels of content you might, repeat
might, want to specify 20 pixels width; but you told us those
cells have _no_ content. You do not want to be using a table in that
way merely for layout -- and you probably don't want to be doing
your layout in pixels.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #5

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

Similar topics

6
by: Christopher Benson-Manica | last post by:
http://ataru.gomen.org/files/html/files/test.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Test page</title> <style...
5
by: Chris Leipold | last post by:
Hi, I have a problem with an element of 100% width and a left paddig. The effect I try to achieve is easy, take a look at: http://swing-tanzen-verboten.de/test.html My Problem is, the width...
1
by: Stephen | last post by:
I have a datagrid and i'm trying to fix the width of one of the columns to be exactly 300px. My problem is that one of the records fields(CompanyName) is really long and has no spaces so it...
4
by: mike eli | last post by:
Hi, I have several absolute positioned elements inside an absolute positioned DIV. I would like one of the nested elements to have a dynamic width. I set it's left and right attributes to 5, so...
0
by: Stephen | last post by:
I have a datagrid and i'm trying to fix the width of one of the columns to be exactly 300px. My problem is that one of the records fields(CompanyName) is really long and has no spaces so it...
3
by: Louis. | last post by:
Hello, I have a cell that I making 200px wide with a style sheet. I am setting the padding-left to 40px and the padding-right to 0px. I have 160x3 px gif in the cell. There should be no space...
11
by: Gérard Talbot | last post by:
Hello, <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <title></title> <style type="text/css"> body {background-color: white; color: black;}...
1
by: pamate | last post by:
Hi all, I am creating tables using CSS ( tag).I am facing problem of width . I am giving 70% and 30% width to the respective div`s but it showing me difference in IE and Mozilla its not showing...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
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...

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.