Originally posted by pornopete
Some CSS "must knows" from me, and please share yours
Collapse
X
-
-
CSS is great !
Hi StuartD,
My site uses XML/XSLT & CSS.
In the start I did not like CSS because I did not understand it, however after using it I find it is great...
To visit my site click here.sig too bigComment
-
keep posting questions or CSS tips, this is a great thread and even for the
ones that are familiar with CSS you can learn new tricks or tips posted by
others.....especially since with CSS there's many different ways to accomplish
the same result.
Comment
-
This thread isn't entertaining enough for people to care about.
But it's ok, if it helped even one person, that's good enough for me.Comment
-
Comment
-
I only started using CSS in the past six months or so. I'm not much a code junky and for the most part I'm just using it to tweak blogs or make simple galleries, but let me tell you it's fucking amazing how even simple things like float:left and float:right make life so much easier for me.
Before CSS, I was using tables in gallery design.




My galleries look much nicer, much cleaner, and actually convert a little better with the same sponsors (although their real test is coming in the next few days when my new Hun galleries start getting listed).Comment
-
Comment
-
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.Comment
-
Firstly.... strict is what i recomment for xhtml and for html as it is the closest to "standards compliant" that it will get. It means that even IE (yes, the devil browser) will try it's damnedest to be compliant and display your CSS the way that it's meant to be displayed.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.
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.Comment
-
couple tidbits I didnt know.
THanks StuComment
-
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:
This works by using the wildcard match to make every element on the page have no padding and no margin without having to constantly redefine these.Code:* { margin:0; padding:0; }
Enjoy.
Comment




Comment