Click to See Complete Forum and Search --> : What is CSS


Jonathan
06-16-2003, 01:09 PM
What is CSS? Tell me what I am doing wrong on my site.

www.crosspoint.org

David Harrison
06-16-2003, 01:47 PM
It seems as though you know what CSS is already with all of this:

<style>
<!--
a{text-decoration:none}
//-->
</style>
<style>
<!--
BODY{
scrollbar-face-color:#30c;
scrollbar-arrow-color:#cff;
scrollbar-track-color:#3cf;
scrollbar-shadow-color:#fff;
scrollbar-highlight-color:#fff;
scrollbar-3dlight-color:#fff;
scrollbar-darkshadow-Color:#fff;
}
-->
</style>
<style>
<!--
BODY{
cursor:url("christian_fish.cur");
}
-->
</style>

it stands for cascading style sheets and it's a new, and supposedly better, way of laying out the content of your page.

Although you may be able to improve/reduce your code a little by replacing all of your style tags with just this one in the head.

<style type="text/css"><!--

a{text-decoration:none;}
a:hover{color:#000000; text-decoration:underline;}

body{
scrollbar-face-color:#3300CC;
scrollbar-arrow-color:#CCFFFF;
scrollbar-track-color:#33CCFF;
scrollbar-shadow-color:'';
scrollbar-highlight-color:'';
scrollbar-3dlight-color:'';
scrollbar-darkshadow-Color:'';
cursor:url("christian_fish.cur");
background-color:#36F;}

h1{text-align:center;font-weight:bold;text-decoration:underline;}
h2{text-align:center;font-style:italic;}
h4{font-weight:bold;text-decoration:underline;}
table{margin:0 auto;}
td{text-align:center;background-color:#FFFFFF;}

--></style>

Jona
06-16-2003, 02:56 PM
Originally posted by lavalamp
[I]t stands for cascading style sheets and it's a new, and supposedly better, way of laying out the content of your page.

Supposedly better? It is better--much better, and easiser to use. It has a lot more to offer, as well. ;)

Jonathan:

From the W3C at http://w3.org/tr/css2
CSS2 is a style sheet language that allows authors and users to attach style (e.g., fonts, spacing, and aural cues) to structured documents (e.g., HTML documents and XML applications). By separating the presentation style of documents from the content of documents, CSS2 simplifies Web authoring and site maintenance.

CSS2 builds on CSS1 (see [CSS1] (http://www.w3.org/TR/CSS2/refs.html#ref-CSS1)) and, with very few exceptions, all valid CSS1 style sheets are valid CSS2 style sheets. CSS2 supports media-specific style sheets so that authors may tailor the presentation of their documents to visual browsers, aural devices, printers, braille devices, handheld devices, etc. This specification also supports content positioning, downloadable fonts, table layout, features for internationalization, automatic counters and numbering, and some properties related to user interface.


You might want to check http://www.w3.org/Style

Jona

Charles
06-16-2003, 03:01 PM
Originally posted by lavalamp
[I]t's a new, and supposedly better, way of laying out the content of your page. The CSS1 Specification came out 17 Dec 1996 (http://www.w3.org/TR/REC-CSS1). That's ancient in web years.

David Harrison
06-16-2003, 03:05 PM
I say supposedly better because, while it is generally believed that css is better, it is up to an individual whether they think the same.
For example I think that css lacks the capability to centre things properly. If you think that you know a way to centre the main div tag in the html source I've uploaded you let me know, by the way it has to work in IE 5.x because I've tried margin:auto; and it just ignores it.

David Harrison
06-16-2003, 03:08 PM
newer

Jona
06-16-2003, 03:08 PM
Lavalamp, your code has an HTML 4.01 Transitional DTD, but your code looks like XHTML.

Originally posted by lavalamp
newer

What do you mean? ;)

Jona

David Harrison
06-16-2003, 03:14 PM
I re-taught myself HTML and it also teaches XHTML and so it recommends, as a good habit, to put stuff like <img src="123.gif" /> rather than just <img src="123.gif">. But also I thought that hr tags were depreciated (I'm gonna replace the hr's with two div tags with coloured top margins because Netscape 7.0 doesn't position hr's properly).

khaki
06-16-2003, 03:14 PM
it stands for cascading style sheets and it's a new, and supposedly better, way of laying out the content of your page. it may be the recommended standard....
but i have to come to lavalamp's defense...
since he does mention "layout" (specifically).

sure CSS is "supposedly" better...
but it's not "realistically" better.
I've been part of threads here which consume many pages trying to duplicate what can be done using tables.

that is not to say that pages should be layed-out using tables....
but it does say that CSS is not an obvious and intuitive solution.

so until CSS becomes much more clear in the way it handles layout...
it remains "supposedly better".
so... let's not vilify lavalamp for what he said (particularly considering how he said it) .

my opinion...
;) k

Jona
06-16-2003, 03:21 PM
I'm simply pointing out the truths. Tables should only be used for tabular data (according to the WCAG 1.0). CSS is a little more difficult to use for layout rather than tables, but it is worth it. You can add many more effects to your layout via CSS, whereas tables are static and, unless enhanced with CSS, dull (in my opinion). CSS can add many things like borders, and you can set the size, color, style (dashed, dotted), etc., with CSS. This cannot be done (only to an extent) with HTML alone.

Jona

David Harrison
06-16-2003, 03:22 PM
Sorry Jona, I meant to say newish, but then it's all new to me because the first contact I had with HTML was in 1998 (I know it's a long time in web years) but I didn't make any active attempt to learn any of it until 2000. So I don't know if I've been slow to get to where I am now in 3 years, you can make up your own mind about that.

Jona
06-16-2003, 03:23 PM
Originally posted by lavalamp
I re-taught myself HTML and it also teaches XHTML and so it recommends, as a good habit, to put stuff like <img src="123.gif" /> rather than just <img src="123.gif">.

Then use an XHTML DOCTYPE, rather than an HTML one.

Jona

khaki
06-16-2003, 03:27 PM
Originally posted by Jona
I'm simply pointing out the truths. Tables should only be used for tabular data (according to the WCAG 1.0). CSS is a little more difficult to use for layout rather than tables, but it is worth it. You can add many more effects to your layout via CSS, whereas tables are static and, unless enhanced with CSS, dull (in my opinion). CSS can add many things like borders, and you can set the size, color, style (dashed, dotted), etc., with CSS. This cannot be done (only to an extent) with HTML alone.

Jona fair enough.
you list many things that CSS can do.
however... one MAJOR thing is missing: HEIGHT

when we talk "layout"....
HEIGHT and WIDTH must be considered to be major players, right?

well.... CSS fails that test.
so... until it corrects itself in the next release...
it's only "supposedly better".

;) k

David Harrison
06-16-2003, 03:27 PM
I was wondering whether I should do something like that, but then wouldn't browsers made before XHTML came out not understand the doctype and possibly not interpret the code correctly, or would they just ignore it and just read it as normal HTML.
(Actually I was thinking about changing the doctype from HTML 4.01 to a lower number, for the same reason as explained badly above).

Jona
06-16-2003, 03:32 PM
Originally posted by khaki
[W]ell.... CSS fails that test.


And how do you arrive at this conclusion?

Originally posted by lavalamp
(Actually I was thinking about changing the doctype from HTML 4.01 to a lower number, for the same reason as explained badly above).

If you set the DTD, any browser should be able to interpret it. The DTD (with the URL, of course) specifies what elements exist and what they do/are for. Older browsers will only have trouble interpreting code that is above their level, and thus if they can interpret all HTML 4.01 Transitional correctly, they can translate all XHTML 1.1 correctly.

Jona

David Harrison
06-16-2003, 03:41 PM
This is the only XHTML 1.1 DOCTYPE that I could find so I'm guesing that there is only one variety of XHTML 1.1, strict. Anyway how's this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

Jona
06-16-2003, 03:44 PM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

The above is what you should use for XHTML 1.1. The code you posted was missing a quote. ;)

Jona

David Harrison
06-16-2003, 03:47 PM
Ooops, I must have deleted it when I was deleting spaces to get it all on one line. Does it matter if it's all on one line or is it just convention for it to be on two.

Jona
06-16-2003, 03:49 PM
The W3C does it the way I posted. Here is a list of valid DTDs (http://www.w3.org/QA/2002/04/valid-dtd-list.html)

Jona

jeffmott
06-16-2003, 05:32 PM
I've been part of threads here which consume many pages trying to duplicate what can be done using tables.When speaking strictly about CSS (and not any particular browser's implementation of it), layouts can be made to mimic the visual rendering of tables perfectly. Netscape supports these features. Opera supports these features. Microsoft (surprise, surprise) does not. And since they do hold ~90% of the market, they make it nearly useless.

Jona
06-16-2003, 05:52 PM
Originally posted by jeffmott
Microsoft (surprise, surprise) does not...

:D lol. Isn't that interesting? :D Microsoft has a big problem with following rules...

Jona

Jona
06-16-2003, 06:21 PM
Originally posted by lavalamp
Sorry Jona, I meant to say newish, but then it's all new to me because the first contact I had with HTML was in 1998 (I know it's a long time in web years) but I didn't make any active attempt to learn any of it until 2000. So I don't know if I've been slow to get to where I am now in 3 years, you can make up your own mind about that.

I started learning HTML in May last year.

Jona

spufi
06-16-2003, 06:27 PM
Originally posted by Jona
The W3C does it the way I posted. Here is a list of valid DTDs (http://www.w3.org/QA/2002/04/valid-dtd-list.html)

Jona

And let's just hope the HTML 2 and 3.2 listings are there for pure historical reasons. ;) I believe that from here on out there will be no more transitional dtds. If I remember correctly, HTML 4.01 is the last version of HTML, and from here on out it's XHTML. Since XHTML is more into having strict guidelines I doubt future versions of XHTML with include anything besides a "Strict" dtd. A Framset version might be included, but I believe that iframe is being promoted over frames so a frameset dtd may also be dead.

spufi
06-16-2003, 06:28 PM
Oh, I forgot to say that I find it funny that HTML 4.0 is not listed on W3C's page for valid Doctypes.

Jona
06-16-2003, 06:34 PM
Originally posted by spufi
A Framset version might be included, but I believe that iframe is being promoted over frames so a frameset dtd may also be dead.

But I don't think they would deprecate frames, even if they are used less often. IFrames cannot competely replace frames.

Originally posted by spufi
I find it funny that HTML 4.0 is not listed on W3C's page for valid Doctypes.

Funny? HTML 4.0 is deprecated, so it is "recommended" that you use HTML 4.01; however the validator keeps support for HTML 3.2 (Final), HTML 4.01 (Transitional), and HTML 4.01 (Strict).

Jona

Charles
06-16-2003, 07:00 PM
Just to set the record straight.

HTML 2.0 was the IETF version.

There were a few experimental versions of the 3.x variety.

HTML 3.2 was a description of how the major graphical browsers worked at the time.

HTML 4.0 is a description of how browsers should work but it was superseded by HTML 4.01 for a great number of tiny little reasons. (See http://www.w3.org/TR/html401/appendix/changes.html for the list.)

To tide things over until browsers implemented CSS, the W3C gave us a transitional DTD that included all of HTML 4.01 and all of HTML 3.2. They also added a frameset DTD.

XHTML 1.0 is nothing but an XML version of HTML 4.01 so there are XHTML 1.0 strict, transitional and frameset DTDs.

XHTML 1.1 is nothing but XHTML 1.0 strict.

XHTML 2.0 is really cool but still in the works (http://www.w3.org/TR/xhtml2/).

Frames are being upgraded to Xframes (http://www.w3.org/TR/xframes/).

Jona
06-16-2003, 07:10 PM
lol, You did set the record straight for me. Thanks. ;)

Jona

khaki
06-17-2003, 08:26 AM
Originally posted by jeffmott
When speaking strictly about CSS (and not any particular browser's implementation of it), layouts can be made to mimic the visual rendering of tables perfectly. Netscape supports these features. Opera supports these features. Microsoft (surprise, surprise) does not. And since they do hold ~90% of the market, they make it nearly useless. okaaaaaaay....
so what I will do is completely ignore my reality...
and stick my head high into the clouds and exhalt CSS and it's "perfect" layout ability...
and I'll just pretend that I live in the perfect world that you guys seem to inhabit...
and I'll just tell my boss (and all of our clients) that CSS is perfect.....
and if anything doesn't look right or work properly... they should hold Microsoft accountable (and not ME)...
and...

oh wait.....

no

sorry

I can't live in your world with your holier-than-thou ideals....
cause...
I gotta live in the real world (y'know the one I'm talking about.... the one that Micorsoft dominates).

so if you guys want to have a debate about big-bad Microsoft... go ahaed.
But some of us here are just trying to make pages that will convey content/data in a real-world setting.
And unfortunately we don't always have the time to make the W3 happy...
because it's the boss who actually gives us our paychecks.

gosh guys...
please stop being so idealistic and critical.
Some of us need help (in the real world).
We come here for help....
not lectures.
(and definitely not for lessons in corporate tactics).

There are plenty of us trying to find the balance and do things correctly....
so please stop bullying us simply because you feel that any deviation from the standards is a personal act of war against you.

I'm not looking to fight you guys...
so I don't understand why you feel that you must beat me up (and others) with your idealistic, perfect-world expectations.

The world is not perfect...
I'm just trying to survive in it.
If you want to deny people help just because they criticize CSS.... well... then... the world is even less perfect than I originally thought it was.
yeesh. how disappointing.

:( k

khaki
06-17-2003, 10:43 AM
quote:Originally posted by khaki
[W]ell.... CSS fails that test.

quote:in response by Jona
And how do you arrive at this conclusion?

well...
for all of you hardcore CSS purists...
if it's so "perfect"...
then why the need for hacks?
(and why are people not entitled to point-out the shortcomings) :rolleyes:

http://forums.webdeveloper.com/showthread.php?s=&threadid=10910&pagenumber=1

soooooooo simple (HA!)
I guess I just wasn't aware that the standards required the need to learn hacks in order to get everything to work so perfectly.

:rolleyes: k

spufi
06-17-2003, 10:55 AM
RE: Tables and CSS

http://www.sitepoint.com/books/css1/

http://www.ericmeyeroncss.com/

Jona
06-17-2003, 10:59 AM
Originally posted by khaki
okaaaaaaay....
so what I will do is completely ignore my reality...
and stick my head high into the clouds and exhalt CSS and it's "perfect" layout ability...
and I'll just pretend that I live in the perfect world that you guys seem to inhabit...
and I'll just tell my boss (and all of our clients) that CSS is perfect.....
and if anything doesn't look right or work properly... they should hold Microsoft accountable (and not ME)...
and...

oh wait.....

no

sorry

I can't live in your world with your holier-than-thou ideals....
cause...
I gotta live in the real world (y'know the one I'm talking about.... the one that Micorsoft dominates).

so if you guys want to have a debate about big-bad Microsoft... go ahead.

Like I said before, I'm simply stating the facts. CSS can do anything, and more so, than anything in simple HTML markup. This, for one, isn't the best place to declare that you dislike using CSS, it is the CSS forum, after all. ;)

CSS can be used to replace almost everything in HTML that most people use--The CENTER element works but is not only deprecated but can be replace with <P style="text-align:center;"> or you can use a STYLE tag in your HEAD tag and have all P elements aligned to the center, or you can set a CLASS for them--or you can set a DIV class! Now you tell me that HTML has much more power than CSS--tell me to my face. :)

Originally posted by khaki
But some of us here are just trying to make pages that will convey content/data in a real-world setting.

That's a controversial statement. If you want it the content to format correctly on all browsers, follow what the W3C recommends. They don't work for nothing, you know.


Originally posted by khaki
And unfortunately we don't always have the time to make the W3 happy...
because it's the boss who actually gives us our paychecks.

True, but have you thought about the fact that if you made your sites according to the W3C and explained to your boss what it's for, why you need it, etc., you'll find that your paycheck might be increased--or your clients, one or the other. ;)

Originally posted by khaki
gosh guys...
please stop being so idealistic and critical.
Some of us need help (in the real world).
We come here for help....
not lectures.
(and definitely not for lessons in corporate tactics).

I come here for help when I need it, too, but I also help others as do you occasionally. But this does not mean that we shouldn't advise those whom we help--we are, then, helping them by "being critical."

Originally posted by khaki
There are plenty of us trying to find the balance and do things correctly....
so please stop bullying us simply because you feel that any deviation from the standards is a personal act of war against you.

Are you trying? I follow the standards because I realize their importance, not so that I can boast about the fact that I "know more than you," or, "can do more than you," etcetera. I'm not bullying you around, and I'm not trying to argue--like I said earlier, I am only stating the facts.


Originally posted by khaki
I'm not looking to fight you guys...
so I don't understand why you feel that you must beat me up (and others) with your idealistic, perfect-world expectations.

I'm not looking to fight you either, and I won't say who I think would win (:D), but I am trying to help you--that's what this forum is for, right (as you mentioned earlier)? If you don't want help, just tell everyone, "When I post questions here I don't expect to be answered." ;)

The world isn't, hasn't been, and never will be "perfect," but attempting to live and work in a so-called, "perfect" world helps to improve it.

Originally posted khaki
If you want to deny people help just because they criticize CSS.... well... then... the world is even less perfect than I originally thought it was.

I'm helping them by suggesting that they use CSS over a lot of markup, just as the W3C recommends. Have I harmed anyone or not answered them for the sole reason that I believe their HTML is invalid? No, I haven't; the only time I've denied someone is when I do not know the answer, or they choose to expect more from me than I can give--I don't get paid to come here and help people, it's a free service. Be glad I'm here--I'm glad everyone that is here, is here because without them I would have less discussion and support.

Jona

Jona
06-17-2003, 11:03 AM
Originally posted by khaki
well...
for all of you hardcore CSS purists...
if it's so "perfect"...
then why the need for hacks?
(and why are people not entitled to point-out the shortcomings) :rolleyes:

http://forums.webdeveloper.com/showthread.php?s=&threadid=10910&pagenumber=1

soooooooo simple (HA!)
I guess I just wasn't aware that the standards required the need to learn hacks in order to get everything to work so perfectly.[/B]

Didn't Jeff already answer this?

Originally posted by jeffmott
When speaking strictly about CSS (and not any particular browser's implementation of it), layouts can be made to mimic the visual rendering of tables perfectly. Netscape supports these features. Opera supports these features. Microsoft (surprise, surprise) does not. And since they do hold ~90% of the market, they make it nearly useless.

CSS is virtually flawless, although it is being improved very quickly. There are "hacks" because some browsers (namely MSIE) implement the way it looks the way they want it to, instead of complying to the W3C.

Jona

khaki
06-17-2003, 11:13 AM
i'm not advocating the use of tables for layout

that's all

i've had about enough of this

Jona
06-17-2003, 11:18 AM
Originally posted by khaki
i'm not advocating the use of tables for layout

that's all

i've had about enough of this

Originally posted by me (Jona)
I'm simply pointing out the truths.

Jona

nkaisare
06-17-2003, 12:48 PM
ISSUE OF HEIGHT IN CSS
Hey, its news to me that height: 100px doesn't work. Hey, it does!! It does in IE, NS, Moz, Op every browser.

What does not work is height: 100%
Thats because browsers are free to interpret 100% height as height of the viewport (screen) or height naturally occupied by the <body> tag.

Same with width: 100%
But almost all browsers understand width:100% as width of the viewport, because the web default so far has been vertical scrolling (and not horizontal scrolling) when the content does not fit the viewport.

WHAT W3 SAYS IS NOT A GOSPEL
But its meant to reduce the insanity that prevails due to browser-specific tags. There is a way to introduce browser-specific tags legally... however MS completely ignores these directives. MS being the browser of preferance, any website needs to suppport it or lose the audience.

Having said that, most W3 specs are darn well supported by IE. There are a few annoying bugs, but a large majority of them have well developed work-arounds. Its these workarounds that stumble the CSS-wannabies.

SOME THINGS AREN'T INTUITIVE
CSS throws open a wide range of possibilities. Things that were easy to achive using frames (for example stmasi's requirement of footer taking the bottom 15px and header+nav taking the top 115px of the window ALWAYS) may not be easy using CSS. Not that it isn't possible. For example:
http://www.prism.gatech.edu/~gte207x/stmasi.html
works well in a browser that supports standards. Unfortunately, that means, IE makes a mess of it. The question is:
whether to keep the CSS layout OR
use frames?
I would probably do the former, after making my display requirements more flexible. You may want to choose the latter. There isn't ONE SINGLE right way. There are multiple ways, each having its own advantages and pitfalls.

The one way that has minimum pitfalls is the one that
1. confirms to the standards, and
2. is viewable in browsers that 95% of your viewers use (for me, that means supporting NS4.7 as well, as I get as many as 13% hits from NS4.7).
For me, the priority was 2 then 1 when I first designed
http://www.prism.gatech.edu/~gte207x/ (thats a cheeky advertisement of my site ;)). While all pages validate as HTML 4.01 Transitional, most of them use tables for layout. Now the priority is 1 then 2. That means a layout like
http://www.prism.gatech.edu/~gte207x/web4vibha/ns4view.html
for NS4.7 is acceptable to me.

Again, its my preference. While I am likely to advocate it to others on the forum, its not required that others follow suit.

THINK OUTSIDE THE BOX
Another thing thats not too intuitive for CSS newbie is simulating a div stretch. But the question is: do you really want the div to stretch, or is it because that was most convinient in table-layout? CSS throws a range of possibilities and you no longer need to think in terms of grid layout.

Although divs are still rectangles, you can mix and match 'em to create amazing layouts. As an extreme example of creativity, you can see the CSS Zen Garden (http://www.csszengarden.com/).

Cheers :)
Niket

Jona
06-17-2003, 01:20 PM
Well said, Niket! :)

Jona

khaki
06-17-2003, 01:50 PM
ISSUE OF HEIGHT IN CSS
Hey, its news to me that height: 100px doesn't work. Hey, it does!! It does in IE, NS, Moz, Op every browser.

What does not work is height: 100%
Thats because browsers are free to interpret 100% height as height of the viewport (screen) or height naturally occupied by the <body> tag. maybe I wasn't very clear on that Niket.
But yes.... it was HEIGHT as in 100% (percentages) which I was specifically referring to (and which was a topic for a few threads that we both participated in, I believe :) ).
(plus... I linked to one of the more recent ones.... which has still not been answered :rolleyes: )

And as far as CSS goes....
I use it for fomatting.
I use it almost exclusively for positioning and for layout...
(regardless of how others may make it appear :rolleyes: )

but it does not handle % HEIGHT, which has caused difficulty for me (and others, as is evident from the number of threads here in this forum) in trying to comply with the CLIENT'S standards (in which case... NO other standards need apply - as you also calmly point-out).

I stand by my statement regarding HEIGHT and WIDTH as being crucial to layout.
And to have only 3 of 4 options available to us (width as px and %, and height only as px)... it is a fact that CSS has shortcomings when it comes to layout (although those who can see nothing wrong with CSS can believe whatever they wish... I really don't care).

Thanks for taking the time to write as much as you did Niket...
although we have pretty much discussed those same issues on other threads here.
In fact... your bullet-points pretty much summarize everything that I have said to this point:

WHAT W3 SAYS IS NOT A GOSPEL

SOME THINGS AREN'T INTUITIVE

THINK OUTSIDE THE BOX

,,, and as far as lavalamp is concerned:
thanks for hanging me out to dry buddy :(
see if I ever back you up on anything again :rolleyes:

sick of the sh*t...
:( k

Jona
06-17-2003, 02:05 PM
Originally posted by khaki
(plus... I linked to one of the more recent ones.... which has still not been answered :rolleyes: )

I never followed that link, but I will now. ;)

Originally posted by khaki
fact that CSS has shortcomings when it comes to layout (although those who can see nothing wrong with CSS can believe whatever they wish... I really don't care).

Did I say that CSS did not have shortcomings? I said it is virtually flawless, but nothing is perfect--but that's why CSS is being improved; that's why the world isn't perfect but can be a better place if perfection is a primary goal.

As far as the height issue, learn to deal with it. I have. Nothing is handed to you on a silver platter--at least not for me. Working the only way to receive anything in this world; and you don't always get what you worked for.

Don't get tired of this sort of conversation, it will come up in the future for certain; instead, learn from it. I'm not the best at Web development, but I'm hear to learn with everyone else who is here. I'm willing to learn and be taught.

Don't feel as if I'm targetting all of my comments directly at you--it's not that way at all. As a matter of fact, I hope everyone involved in Web development reads this entire thread. They should learn as you should learn, as I should learn from those who know more than me or know something I do not.

Chill. :D

Jona ;)

nkaisare
06-17-2003, 03:00 PM
I still don't know ANY method to cope with stmasi's problem, except frames. I believe my (as well as Charles' and others') position is clear on frames: frames are NOT inaccessible if used appropriately... tables-based layout can't do the 100% trick.

I don't think you can take one example here as a benchmark. No doubt CSS is another thing that one needs to learn; with the learning curve comes the lethargy to migrate. But didn't table layout have its own curve? Designing transparent gifs to exactly fit space to get desired layout, cutting pictures and placing them in adjecant table cells etc.

Yes, Charles, Stefan (haven't seen him for a long time), myself - we all tend to state that CSS layout is the only thing to do. Its partly because (I can speak only for myself) its required to really prod people to use the "new" technology. I hell know I wouldn't have considered CSS layout if not for Stefan's constant hammerring... he literally hammerred CSS's way into my brain. And thats part of reason why I do so (though not with as much zeal :)) too. That doesn't mean that one fine morning you should give up all tables and use CSS (thats a scenario in perfect world...). Take your time - first to remove nested tables to get the perfect border, to remove transparent gifs and replace them with margin and padding, then to remove the header from table and place it within a div, then to remove the left navigation and position using float or position: absolute, then to give up tables completely. But until you make your website standards compliant, people here will keep reminding, albiet forcefully, that use of tables is against W3C recommendations.

khaki
06-17-2003, 03:14 PM
completely understood.
and almost completely adhered to :)

but...
as long as there remains some problem that CSS is not intuitively (or practically) capable of resolving...
there will be a need for a discussion of the issue.

and (in my opinion)... you cannot have an open discussion with a closed mind.

that's how this discussion began...
and unfortunately it is how it finished (respectively).
(not to be confused with "respectfully")

I always enjoy your cool and calm logic Niket...
;) k

jeffmott
06-17-2003, 07:54 PM
Khaki, my post was meant to make the distinction that the shortcomings of using CSS on the Web today is not due to CSS (the language) being deficient, but rather it's support on browsers. Note that there was no "should" or "should not" in my post. I did not say CSS must be used in all situations (or even this situation). I stated simply that CSS (the language) is fully capable of handling what others were saying it wasn't, but in terms of *practicality*, is *not* currently usable (I did not ignore the practicality issues). While both you and I may know that the majority of problems with it is due to browser incompatibilities, the original poster (and any other newcomers to CSS) may not. This would otherwise give them the impression that CSS is no good. And given that this is their first impression, they will likely retain that opinion of it long after it becomes better supported.

As far as your problem with height: the CSS specification says "The percentage is calculated with respect to the height of the generated box's containing block." Note that the body is a containing block, and so is the HTML element. Whether these elements default to the size of the window or the size of its contents is browser dependent. So, we do need to state what we want explicitly:<style type="text/css">
html, body { height: 100% }
</style>With this, I think you'll find your height percentages working as you would expect.

This is another one of my own buttons that is pressed: when CSS (or anything else) is criticized given that both the language support and the implementation support is there, the developer just doesn't understand how to use it, and then spreads the message to others about how it can't do it.

David Harrison
06-18-2003, 05:09 AM
Hey khaki, what did I do?