![]() |
Why use XHTML strict?? I was going to try and do that but found it too limiting for me and so I've been using XHTML Transitional and am VERY happy with the results I'm getting. I've been validating all my pages as I do them until I'm very proficient at it.. (pretty much there now but it still helps as it catches errors).
The one thing I don't understand with CSS is the difference between using "#" or ".". My understanding is that # is used only for items that will be used once on the page and you set the id= parameter.. the other is for a "class" which can be used multiple times... So why not just make everything a class and then you don't have to worry about it? I've noticed some sites get it wrong where they define something using # and then use it in multiple locations. |
Quote:
If you don't do a ton of less compatible stuff, then transitional would be quite fine as it sort of interprets things as best it can without being... well, strict. Secondly, ID's and classes are meant to be used as if it were chapters and volumes in a novel. An ID for an area, such as "rightcolumn" that would only ever be set once, and then classes within it that might be used over and over within that "volume". But yes, I agree... it really would make sense to just use classes all the time really. It would work just as well. Someone somewhere along the way decided on "structure" and chose ID's and classes. |
couple tidbits I didnt know.
THanks Stu |
thanks for the info I'm learning CSS atm and this thread is very useful :)
|
Here's a quick tip:
Instead of wrangling with every element and having to put margin:0;padding:0; use this at the top of your CSS: Code:
* { Enjoy. :thumbsup |
Quote:
|
Great thread and great idea!
But, there's a lot I don't understand with CSS, and Stuart's example below shows my ignorance. Take the Acid 2 Test and see if your browser is compliant... Safari 3 passes the test, Opera 9 neerly passes (nose colour wrong), and besides some very minor other browsers that's it. The reason I bring this up is that Safari 3, 100% compliant, renders the below wrong. There is no header - the images start and the text wraps around. CSS is great, and these kinda rules are essential, but it goes much deeper than simple rules - the only rule is to test in as many browsers as possible. Quote:
|
Excellent thread! BUMP!
|
Quote:
|
50 CSS tips and tricks....
Let's keep sharing! |
Awesome thread, Stu, bookmarked! You know how much I LOOOOVE Css... grrr
|
one problem i have with my 3 column wordpress css layouts is how to make the 2 colored sidebar columns go all the way to the bottom - as it stands they only go down as far as there is content in them.
any tips css gurus ? |
CSS is the suck and not necessary.
|
Quote:
|
I must say, to me 'pure css' designs, still seem in the realm of 'hacky' at best, but I love making hybrids : let tables make the main structure, throw in divs and css for the rest, match made in heaven.
|
Quote:
|
Ths is a really great thread. I hate CSS with a passion but as a full time blogger I am always dealing with it in my WP themes. I find that even the simplest adjustment takes forever to figure out in CSS.... but maybe this thread will help me.
|
|
Quote:
|
Quote:
Sorry for the double post. |
I'm sorry, but your number one tip??? What does css designing have to do with doctype? If you design a website, in tables or css the doctype has nothing to do with how it's displayed in a browser. I've been doing pure css design for a long time now, and can write my code in either doctype properly with no errors or warnings off hand. However, even if you say wrote xhtml strict code, with a html 4.0 doctype. It would still end up rendering the same in a browser.
|
Quote:
The official differences are found here: http://www.w3schools.com/tags/tag_doctype.asp You can read more about how they function differently here: http://www.oreillynet.com/pub/a/java...8/doctype.html Personally, I have found that I can really struggle getting my CSS layouts to look exactly the same in all browsers until I make the doctype strict. Certain things like top 0 and left 0 can be very different in FF and in IE... until you set things to strict. |
K.I.S.S. is my only rule.
|
Quote:
But then, CSS isn't meant to be used entirely by itself. It's meant to be used in conjunction with javascript, so it's not all bad :) |
Quote:
|
Quote:
Now we've got W3C (whom MS has never been on great terms with) and Firefox demanding things be done a certain way. Fact is, they have no room to talk. As long as MS controls 90-95% of the market, they don't need to listen to the little guys creating their "official" standards. In reality, whatever MS does is THE standard that designers will live by. Yeah, it really sucks that MSIE and Firefox don't work exactly the same. But my point is, MS needs to have most of the influence at W3C given their market position. |
bookmarking
|
Quote:
The original CSS construction is more time consuming than an HTML design. So if we are talking about one off "build it and forget it" pages then I stick with HTML. But if this is for a major site that may require a little tweak that is on every page, then CSS is the way to go. |
awesome thread :thumbsup
great tips, StuartD :thumbsup bookmarked |
Quote:
An all HTML design is actually quite not possible, especially in today's world of tours and layouts. I say that because tables were never meant for designs, they were meant for data organization... such as spreadsheets. The only way to do many designs strictly in HTML is to have nested tables and that's very bad form. Especially in IE which requires the entire contents of the table to be downloaded before rendering any single part of it to the screen. HTML is a markup language which is little more than a way to present information to the browser in lists, forms, tables and so on. CSS is the styling tool that is used to make that information look good. And if you begin creating your pages with CSS, it will take WAY less time than to do it strictly with HTML alone.... as you will require 1/3 or less HTML to accomplish your goals. |
Quote:
Check out what I went thru over here http://www.gofuckyourself.com/showthread.php?t=756104 |
Quote:
|
Quote:
Seriously, I could go through my portfolio and make a copy of every single design and change the doctype on the copies. They'll all look exactly the same. Example; Code:
<table> Code:
<div style="position: relative; top: 0px; left: 0px; height: 100px; width: 100px;"></div> |
Quote:
|
Quote:
|
Let's see either of you make a quick design, copy it, and use a different doctype on each one. I'd love to see what you're talking about.
|
Here's one of my older designs, 100% pure css of course.
http://pulsedesign.biz/printer/css.html 100% pure CSS using xhtml strict code. CSS has positive and relative positions, also has some floats. Should be a more "advanced example" for you. w3c valid code; http://validator.w3.org/check?uri=ht...r%2 Fcss.html w3c valid (no warnings) css; http://jigsaw.w3.org/css-validator/v...er/printer.css Now we'll take the same page, and change nothing but the doc type. Changing it from xhtml 1.0 strict, to html 4.01 strict. - http://pulsedesign.biz/printer/css-doctype.html Page is displayed EXACTLY the same. I tested in FF 2.0x and Safari on OSX, and IE 6.0x on Windows XP. I could pull out hundreds more designs and show you the same thing over and over. Instead, I showed an example on my end. Let's see one on your end. |
Quote:
Secondly, your html 4 infact does not validate as you have left in the close tags ( /> ) items from your xhtml document. Those aren't required nor valid in html. |
Quote:
http://pulsedesign.biz/printer/css-transitional.html & http://pulsedesign.biz/printer/css-frameset.html & the original (strict) http://pulsedesign.biz/printer/css.html Again, only changing the doctype. This time as per "what you were talking about", keeping it the same xhtml but changing the strict/transitional. Tested in FF 2.0x and Safari on OSX, and IE 6.0x on Windows XP. All still render EXACTLY the same. :thumbsup Quote:
.........So would you please just post up an example of two designs. Code on both exactly the same, with just the doctype changed. Where the end result is the design being rendered differently? |
Also, if you're against using xhtml as an example. I'll even do the same with a design coded in html 4.01. 100% css, w3c valid page, w3c valid css (no warnings). I'll keep the code exactly the same but just change the doctypes from html 4.01 strict, to html 4.01 loose - html 4.01 frameset - and even xhtml strict - xhtml frameset - xhtml transitional. Six pages, all the same code, each with different doctypes. All will render the same in all browsers.
|
All times are GMT -7. The time now is 08:13 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc