HighDots Forums  

td {width: 20px}

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss td {width: 20px} in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
 
Posts: n/a

Default td {width: 20px} - 10-06-2003 , 12:14 PM






---------------
<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>
---------------



Reply With Quote
  #2  
Old   
Peter Foti
 
Posts: n/a

Default Re: td {width: 20px} - 10-06-2003 , 12:23 PM






"<- Chameleon ->" <cham_gss (AT) hotmail (DOT) NOSPAM.com> wrote

Quote:
---------------
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





Reply With Quote
  #3  
Old   
Steve Pugh
 
Posts: n/a

Default Re: td {width: 20px} - 10-06-2003 , 12:24 PM



"<- Chameleon ->" <cham_gss (AT) hotmail (DOT) com> wrote:

Quote:
---------------
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 <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #4  
Old   
AT
 
Posts: n/a

Default Re: td {width: 20px} - 10-06-2003 , 01:31 PM



In article <bls7ol$aqk$1 (AT) nic (DOT) grnet.gr>, <- Chameleon -> wrote:
Quote:
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


Reply With Quote
  #5  
Old   
Stan Brown
 
Posts: n/a

Default Re: td {width: 20px} - 10-06-2003 , 04:45 PM



In article <bls7ol$aqk$1 (AT) nic (DOT) grnet.gr> in
comp.infosystems.www.authoring.stylesheets, <- Chameleon ->
<cham_gss (AT) hotmail (DOT) com> wrote:

Quote:
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.

Quote:
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/


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.