|
-
Jun 24th, 2002, 02:42 PM
#1
Thread Starter
Frenzied Member
(CSS) TR/TD and height attribute
I know you cannot do this
but it looks like you can do this
Code:
<tr style="height:5px">
is that correct?
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 24th, 2002, 03:19 PM
#2
Fanatic Member
Using CSS is legal, but its normally best to either assign it a class or id.
-
Jun 24th, 2002, 03:21 PM
#3
Thread Starter
Frenzied Member
yes, I just did it quickly for sake of post.
Thanks,
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Jun 24th, 2002, 03:22 PM
#4
Fanatic Member
if you use CSS correctly you can just about get around every HTML 4.0 and XHTML 1.0 standard.
-
Jun 25th, 2002, 09:46 AM
#5
Frenzied Member
Originally posted by cpradio
if you use CSS correctly you can just about get around every HTML 4.0 and XHTML 1.0 standard.
Get around?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 25th, 2002, 09:56 AM
#6
Fanatic Member
yeah, "get around".
HTML 4.0 and XHTML 1.0 tell you, you are not allowed to put width="5px" or height="15px" in your <td>, <tr>, and many other tags. Therefore if you use style="width:5px;height:15px" you have just opened a loop whole of including such attributes.
-Matt
-
Jun 25th, 2002, 10:23 AM
#7
Frenzied Member
Ah. I see the confusion.
Uhm... it's not a loophole. These attributes have been deprecated in favor of CSS.
In other words, the HTML standard says don't use width="5px", because you should use inline style or CSS.
Loophole implies that the standard doesn't want you to set layout at all. The standard does, just not with the old, pre-CSS methods.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 25th, 2002, 10:40 AM
#8
Fanatic Member
I know its not a loop hole, I was just using that as a description. I find CSS to be a real pain when using it to define width and height attributes as each browser interprets it differently thus throwing any borders or colors out of alignment with other divs.
Its a real pain in the butt and untill css is more standardized I will be using the width attributes in <td> tags as that is legal.
-
Jun 25th, 2002, 10:46 AM
#9
Fanatic Member
I know its not a loop hole, I was just using that as a description. I find CSS to be a real pain when using it to define width and height attributes as each browser interprets it differently thus throwing any borders or colors out of alignment with other divs.
Its a real pain in the butt and untill css is more standardized I will be using the width attributes in <td> tags as that is legal.
-
Jun 25th, 2002, 11:04 AM
#10
Black Cat
Originally posted by cpradio
I know its not a loop hole, I was just using that as a description. I find CSS to be a real pain when using it to define width and height attributes as each browser interprets it differently thus throwing any borders or colors out of alignment with other divs.
Its a real pain in the butt and untill css is more standardized I will be using the width attributes in <td> tags as that is legal.
CSS has been standardized for years - it's just that there's a certain evil browser that's quite popular that doesn't correctly interpret the height and width tags until version 6 for its maker's OS, and then only if you specifically tell it to be standard compliant thru the doctype tag...
CSS3 is going to have columns, BTW...
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 25th, 2002, 11:09 AM
#11
Frenzied Member
Originally posted by cpradio
I will be using the width attributes in <td> tags as that is legal.
That is fair. But you will have to rewrite your pages once browsers stop supporting the deprecated attributes. Nothing is wrong with that. Just a different way of doing things.
In the meantime, you could avoid deprecated conventions, and help fix the browser market by forcing users to be more selective in their choice, and thus forcing the browser makers to be more aware of the standards.
After all, this isn't cutting edge. These standards have been in place for what... four years?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 25th, 2002, 11:12 AM
#12
Frenzied Member
Wait, never mind what I said about rewriting. A page that uses the correct doctype should always be rendered the same way because it is a version X page. Even after X + n is released, any backwards compatible browser should still be able to render your version X page in the manner you intended.
The stuff about driving the market still holds, though.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Jun 25th, 2002, 12:05 PM
#13
Fanatic Member
I truely disbelieve that CSS is standardized. I consider standard meaning it will display the same result in any browser you view your page in.
My CSS and PHP pages are valid CSS 2 and XHTML 1.0 code (I have tested them). Now originally I was using <div> tags to display the particular style attributes needed for the design. I had the width and height attributes as absolute values yet the borders on higher divs did not match those below, but both had a width of 690px! How is that possible, and how can you call that standardized? (And to make it worse W3C's browser, Amaya, place a linebreak after each <div> )
Secondly, I hear using External style sheets is better than embedding it into your code. I tried this method only to find out that Opera and Netscape 4.7 would not render my site correctly if I used the <link href="" blah blah> method or the <style type="text/css"> @import url("style.css"); </style> method. Why does that happen??
Honestly, I have been working with CSS for the past two weeks straight. I still ahve 35% more backend to do before I can release my project, but I can show you the design (except in <div> tags, i kinda deleted that).
To show you how much trouble I have had with this CSS junk that is supposedly standardized between browsers you can review these threads:
http://www.webxpertz.net/forums/show...threadid=17282
http://www.webxpertz.net/forums/show...threadid=17299
The site I am working on is at http://cpradio.net/advBlogger/ and its only a design right now, atleast until I complete the backend.
-Matt
-
Jun 25th, 2002, 02:04 PM
#14
Black Cat
I truely disbelieve that CSS is standardized. I consider standard meaning it will display the same result in any browser you view your page in.
No, because standards have to be agreed upon and formally written down before browser makers can make their browsers render to the standard, so browsers will always be behind the latest standards.
Secondly, I hear using External style sheets is better than embedding it into your code. I tried this method only to find out that Opera and Netscape 4.7 would not render my site correctly if I used the <link href="" blah blah> method or the <style type="text/css"> @import url("style.css"); </style> method. Why does that happen??
The @import is actually used as a hack to prevent legacy browsers from attempting to use the CSS.
Another thing to take into consideration - correct use of HTML/CSS means that if you totally strip all CSS out of your document it will still be usable and make sense.
Also, the total displayed width of a block is not the CSS width attribute, but margin-left + border-left + padding-left + width + padding-right + border-right + margin-right.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 25th, 2002, 02:07 PM
#15
Fanatic Member
yeah, I know padding and stuff also is in it and all of those were set to 2px so that should not have made a difference.
My site depends on CSS as it follows the standards knowing bgcolor is deprecated
-
Jun 26th, 2002, 09:00 AM
#16
Frenzied Member
Originally posted by JoshT
No, because standards have to be agreed upon and formally written down before browser makers can make their browsers render to the standard, so browsers will always be behind the latest standards.
Yeah, it just sucks that browsers are four years behind.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|