![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
CSS class names must not contain underlines. |
|
font-size: 8pt; `pt' is a unit suited for printouts, not for display devices. |
|
tr td width = "40%" style = "background-color:#ff8800" h5 class = "style_tabletitle">Title leftMiddle</h5 /td td width = "30%" style = "background-color:#cc0000" h5 class = "style_tabletitle">Title leftMiddle</h5 /td td width = "30%" style = "background-color:#cc0000" h5 class = "style_tabletitle">Title leftMiddle</h5 /td /td /tr Headings (`hX' elements with X = [1..6]) should not be abused to achieve greater font sizes. They should reflect the structure of the document instead. If a different font size is needed, use the CSS font* properties. |
#2
| |||||
| |||||
|
|
The character '-' is fine [for CSS class names]? Correct? But in JavaScript functions I can use '_'. Correct? |
|
tr td width = "40%" style = "background-color:#ff8800" h5 class = "style_tabletitle">Title leftMiddle</h5 /td td width = "30%" style = "background-color:#cc0000" h5 class = "style_tabletitle">Title leftMiddle</h5 /td td width = "30%" style = "background-color:#cc0000" h5 class = "style_tabletitle">Title leftMiddle</h5 /td /td /tr Headings (`hX' elements with X = [1..6]) should not be abused to achieve greater font sizes. They should reflect the structure of the document instead. If a different font size is needed, use the CSS font* properties. I use 'hX' only that I can address the appropriate text like h5.style_tableentry_middle |
|
You have written so many hints and I'm still not through in fixing all my faults on my page. However, I still don't know what I have to change so that the added cells (with the JavaScript) do have the same style as the first row which I added by HTML. |
|
In any case, thanks a lot for all your corrections and hints |
|
and if you could give me a little bit more specific hint in how to solve my problem I really would be glad. |

#3
| |||
| |||
|
|
... div class = "style-tabletitle">Title left</div ... or ... p class = "style-tabletitle">Title left</p ... or something else... You need a tag. |
#4
| |||||
| |||||
|
|
... div class = "style-tabletitle">Title left</div ... or ... p class = "style-tabletitle">Title left</p ... or something else... You need a tag. Yea, I also think I need a tag. And now we are back to my initial problem. |
* -- paragraph -->|
I can add everything with the JavaScript what I do with HTML (please see my first post) except that the added text with the JavaScript is not with the 'h5' tag like h5 class = "style-tabletitle">Title left</h5 With the JavaScript I can add only class = "style-tabletitle">Title left |
|
But like we figured out, I do need a tag. Or does someone know a solution without a tag? |
|
My question is still, how to add this tag with a JavaScript? |
#5
| |||
| |||
|
|
The result (which can be seen e.g. in Firefox when using the View Selection Source feature) is tr td style="width:30%" class="style_tableentry_middle">My entry middle</td /tr |
#6
| |||||||||||
| |||||||||||
|
|
First of all many thanks for your great explanations and your help. I really appreciate it very much. |
|
The result (which can be seen e.g. in Firefox when using the View Selection Source feature) is tr td style="width:30%" class="style_tableentry_middle">My entry middle</td /tr Wow, that's really a very nice feature. Thanks for telling me. I'm really surprised that the class statement goes to the <td> and not to the text line as I expected. |
|
I tried to insert your code into my insertRow function (only for the middle column) but it doesn't work. I get the error message: 'x is not defined' what is of course correct. But I've no idea how to define it. |
|
I guess 'x' has to be the same letter like in x.style-tableentry-middle { Correct? |
|
Here is my code (only the Javascript part, the whole code is in my first post): =========================== function InsertRow() { |
|
var xtable |
|
[...] xtable = document.getElementById("MyTable") // Add row xrow = xtable.insertRow(2) |
|
[...] xcell.style.width = "40%" xcell.bgColor = "#ff8800" |
|
[...] var p, t; if (isMethod("x.appendChild") // feature test && isMethod("document.createElement") // feature test && (p = document.createElement("p"))) { // object reference test |
|
[...] if (isMethod("p.appendChild") // feature test |
|
[...] because with my knowledge I'm not able to handle it. |
#7
| |||
| |||
|
|
Code should be executable as posted. The `test' belongs to the single-line comment before. |
|
Unfortunately, one cannot contact you privately via e-mail: seekware-remove- (AT) yahoo (DOT) com>: 67.28.113.10_failed_after_I_sent_the_message./Remote_host_said:_554_delivery_error:_dd_This_user _doesn't_have_a_yahoo.com_account_(seekware-remove- (AT) yahoo (DOT) com)_[-14]_-_mta103.mail.re2.yahoo.com/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |