473,657 Members | 2,395 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

margin for <tr> and <td> are not honored


I just found that for a table, the margin for <trand <tdare not
honored, but the padding is... is this a widely known fact? why make
this an exception for margin, i wonder.
margin not honored:
http://www.0011.com/test_table/index-margin.html

padding honored:
http://www.0011.com/test_table

Nov 4 '07 #1
6 3089
Summercool wrote:
I just found that for a table, the margin for <trand <tdare not
honored, but the padding is... is this a widely known fact? why make
this an exception for margin, i wonder.
What effect do you want margin on a <trto have?

--
John
Pondering the value of the UIP: http://improve-usenet.org/
Nov 4 '07 #2
On Sun, 04 Nov 2007 13:11:00 -0000, Summercool wrote:
I just found that for a table, the margin for <trand <tdare not
honored, but the padding is... is this a widely known fact?

Well it's clearly stated in the specification
(http://www.w3.org/TR/CSS21/box.html#propdef-margin):
'margin'
Value: <margin-width>{1,4} | inherit
Initial: see individual properties
Applies to: all elements except elements with table display types other
than table-caption, table and inline-table
--
Safalra (Stephen Morley)

The 'white-space' Property In CSS:
http://www.safalra.com/web-design/cs...pace-property/
Nov 4 '07 #3

dorayme, you are in Australia?
Nov 5 '07 #4
In article
<11************ **********@y27g 2000pre.googleg roups.com>,
Summercool <Su************ @gmail.comwrote :
dorayme, you are in Australia?
Yes, in Sydney. How you're going, mate!

--
dorayme
Nov 5 '07 #5
rf

"Ben C" <sp******@spam. eggswrote in message
news:sl******** *************@b owser.marioworl d...
... but the status of all these various things varies. I don't know
for sure but I don't think cellspacing is even deprecated.
Know for sure, visit the specifications. cellspacing is not deprecated.

--
Richard.
Nov 5 '07 #6
Summercool wrote:
>
is this just setting the parent's background color? i mean, you can't
set the margin's color of an element per se.
The parent's background color *is* the margin color.

--
Berg
Nov 6 '07 #7

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

Similar topics

0
689
by: Matt Adams | last post by:
I want to move the following <PRE> defintion to a css file: <TABLE><TR><TD><PRE>sample text</PRE></TD> <TD> not predefined font</TD></TR></TABLE> should be <TABLE><TR><TD class=aaa>sample text</TD> <TD> not predefined font</TD></TR></TABLE>
5
7571
by: Monty | last post by:
..rowbackgrnd { background-color: #E4E4F2; border-bottom: 1px solid Black; border-left: 1px solid #E4E4F2; border-right: 1px solid #E4E4F2; border-top: 1px solid Black } It works for <td> tags but not <tr> tags. I've tried a number of alternatives but I canlt seem to figure out what I'm doing wrong.
5
30069
by: Thierry Schembri | last post by:
Hi ! I'm facing problems with a background image in a table (with IE & Opera), it works with FF : the <tr> has a background image, but the background repeats in each <td> ex : tr background -> "this is the background"
2
11206
by: js | last post by:
I have a table rendered with XSLT. The first column has a radio button controls for user to make a selection for a particular row. All the values in the remaining columns are all concated with a &#xA0; (blank). I need to retieve the text in each cell of that row if the radio button on that row is clicked. Each <TD> has a numeric ID so that I can use it with document.getElementById().innerText method. I use Javascript to assign some...
5
5773
by: Gregor Rot | last post by:
Hi, if i have this code: <form><input type=text name="id1"></form> then with javascript i can reference this with this.form.id1, how can i reference something like this: <table> <tr name="id2"> .. ..
2
5760
by: bissatch | last post by:
Hi, I am trying to use JavaScript to write a table column on a web page. The code is as follows: <html> <head> <script> function displaycount() {
3
1703
by: RC | last post by:
I have a very sime html table like <html><head><title>My Table</title> <style> input { margin: 0; padding: 0; border-width: 0; text-indet: 0; text-align: left } </style></head><body> <table border="1" width="100%"> <caption>Table Title</caption> <tr>
4
5255
George Lft
by: George Lft | last post by:
I'm new at building table. Mostly PHP programming . Now I can't seem to fix the size of my table row and column. Any idea? <h4>Two rows and three columns:</h4> <table border="1"> <tr> <td>10000000000000</td> <td>200</td> <td>300</td> </tr> <tr>
1
5500
by: test9991014 | last post by:
Hi folks, I've got something like this: <table> <tr> <td>1</td> <td align=center> <input type=text> </td>
7
2782
by: Xiaoyan | last post by:
Hi,everyone: I have a problem now. I can't get the information between the <tr><td> and </td></tr>. for example: I use this regular expression can't get it, I don't know why. $test=~/<tr><td>(.*)<\/td><\/td>(.*)<\/td><\/tr>/ms; <tr><td>station</td> <td>station number/identification, see chart above: <br> B = GoMoos buoy B location<br> S = New Scantum at the southern edge Jefferys Ledge</td></tr>.
0
8306
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8825
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7327
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4152
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4304
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1615
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.