79 Comments
- rpong1981, on 11/13/2008, -0/+19You must be a stud and learned how to flip burgers so quickly there was little left to learn in your "career".
You see, a web developer's world is dynamic; it constantly changes. There will forever be new techniques, new technology, and different ways to skin a cat. As a web developer who has worked with Comcast, Dell, HP, Palm, RIM, and Paypal, I will always continue to improve my knowledge of the new technologies and new techniques being used around the world.
By your logic doctors who read medical journals are not truly doctors because they should already know how to help people. You have a lot growing up to do, kid. - seretta24, on 11/13/2008, -2/+18this resource is full of incredibly helpful tips. some of it is basic, but all stuff any coder should know.
- charleskirk, on 11/13/2008, -1/+12And you'd be right. Mirror anyone?
- cubicledrone, on 11/13/2008, -0/+11So you spend a week streamlining your CSS. It all works! It looks great!
Then IE ***** the bed. Welcome to web development. - Destinatus, on 11/13/2008, -2/+8how does a comment like this get dugg up? ...Well I thought it was a useful list =
- professorfurley, on 11/13/2008, -1/+7their server: http://www.oit.umd.edu/ITforUM/2002/Spring/tornado ...
- mileswj, on 11/13/2008, -1/+7Lol down already?
Its also probably the same things weve all heard for years. - TriplePlay2425, on 11/13/2008, -3/+9I have grown to be under the impression that every Digg user is a web developer who is obsessed with CSS.
It's the only explanation for the fact that every single CSS tips page gets front page, and many even get into the Top 10. - MWeather, on 11/13/2008, -1/+7Very few Digg users are web developers. If they were we'd see more articles on actual programming and less on writing markup.
- chadisawesome, on 11/13/2008, -0/+5a web developer that doesn't care about CSS??? I think you meant to say FTL.
- mogdor, on 11/13/2008, -1/+5I'm in the process of learning CSS, all tips are helpful, thanks!
- Cnox, on 11/13/2008, -0/+4I'm wondering why they didn't have one of the tips that you can combine CSS classes in the class attribute of HTML elementss.
Example:
.highlight {font-style: bold}
.warning {font-color: orange}
.message {font: normal 12px Arial}
So, you can create a div like this:
<div class="message">A normal message.</div>
<div class="highlight message">A highlighted message.</div>
<div class="warning message">A warning message.</div>
<div class="highlight warning message">A warning message that is highlighted.</div>
I've seen CSS classes like this been declared like so:
.message_highlight {...}
.message_warning {...}
Seems the way of combining classes together is a real space saver. - cloudberries, on 11/13/2008, -0/+4Dugg up for stating my favourite CSS centering trick. Don't forget text-align:center in the parent element!
- billizm, on 11/13/2008, -0/+4WSYIWYG is for noobs and script kiddies..
- rpong1981, on 11/13/2008, -0/+3I agree with tgc1. When I interviewed for web developer positions they ask me, "Why are tables bad?". I don't agree that tables are inherently bad. They simply have their place. I too am tired of all the hacking I have to do with CSS and having a tableless pages.
Not only do I have to account for IE,FF,Chrome,Safari, but I also have to deal with two types of pages. One uses clearfix and the others do not. So when I drop in a header, there will be differences between browsers AND the pages I'm working on. Talk about a freaking CSS nightmare
BTW, I'd take some time to check out Digg's HTML and CSS. It looks rather clean using lists, divs and anchors. - madskjaer, on 11/13/2008, -1/+4You gotta start somewhere?
- cloudberries, on 11/13/2008, -0/+3There are quite a few other more complex tricks in CSS that can come in quite handy - http://kimblim.dk/csstest/
- tgc1, on 11/14/2008, -0/+2Y Rly.
- dcconz, on 11/14/2008, -0/+2Thanks for that link some good tricks in there. It also proves how bad of a browser IE6 really is.
- seinman, on 11/13/2008, -1/+3Web developer? Nah, I just run a porn site. I don't need any fancy titles like "developer."
- MtheoryX, on 11/14/2008, -0/+2You should get more sleep.
- Dubbsacc, on 11/13/2008, -0/+2Well of course, why would there be anyone just entering the industry for the first time....
/s - cloudberries, on 11/13/2008, -0/+2You can reference by class as well as id using javascript. In fact, class and id are just two arbitrary attributes of elements that can be used for DOM manipulation.
Take a look into jQuery, it vastly simplifies the javascript process, and takes away all those cross-browser headaches. - koan, on 11/13/2008, -1/+3"Use progressive enhancements"
Um, no. Web development is hard enough already having to manage rendering inconsistencies between standard elements, without using browser specific code.
Use a good reset and do everything the same way. - Gruul, on 11/13/2008, -0/+2Hum, this mirror is really more interesting to look at.
- PHLAK, on 11/14/2008, -0/+2Good list, though I find that I do all but two or three of these things all the time already.
- PaulMassive, on 11/18/2008, -0/+2If you're still using tables in web development for non tabular data...you shouldn't be doing web development.
- mileswj, on 11/13/2008, -3/+5For many reasons.
My memory may be fuzzy but when rendering a page... the browser has to load tables twice, once for the structure, second for the styling/attributes. Css only renders once.
Ive been coding css only websites for about 3-4 years and I never use hacks. Stop acting like you have to use hacks everytime, the only thing you need are IE conditional statements in the sources to load another css stylesheet for IE. Stop being noobish when it comes to css layouts. - MacHarborGuy, on 11/13/2008, -0/+2most people don't have direct control over their web servers, nor are they forking out the cash for a VPS or dedicated server. they just pay $6 a month for a cheap server because that is all they need.
plus not all of these website owners even know that their story gets put on digg, the submitter may just have submitted it. who's fault is it then? - ericditmer, on 11/13/2008, -0/+2I'm loving the visible HTML and Javascript on the bottom of his webpage. Hah.
http://www.seinman.net/ - drjennings, on 11/13/2008, -0/+1The site is down.... Come on people beef up your website servers!
About 1/3 to half of the Digg articles I decide to read have already been crashed by Diggsters trying to view the site. I'm sure a massive wave of Digg readers can bring down even the most stable systems, but this gets old!
Perhaps Digg could offer a temporary cache for front-page stories to help lighten the load? Something that would only kick-in if the hosting site goes dead? - AmazingAndrex, on 11/14/2008, -0/+1Exactly- I'm not digging this because of that.
- Narcism, on 11/13/2008, -3/+4obviously because more people thought it was repetitive, than thought it was useful. In fact, there's a difference of 2 people.
- rossisdead, on 11/13/2008, -3/+4You consider "margin:0 auto" a hack for centering? I mean, you really have to consider that align=center and the center tags are just shortcuts for typing out "margin:0 auto" for people that don't know ***** about margins.
- rpong1981, on 11/13/2008, -0/+1you use inline styling?
- Streeks, on 11/14/2008, -0/+1"use comments only when necessary"
Holy bad tip batman. I don't care how good of a coder you are, having a neatly commented CSS file beats having several blocks of CSS that you don't understand. Adding future reminders to yourself will only help you out in the event that you want to update your theme.
The more comments the better, as long as you don't end up writing out paragraphs - Corporealshift, on 11/14/2008, -0/+1I generally found tables to be more cumbersome and more inclined to break in IE than tableless designs. Once you take the time to learn how to do it correctly, it's easy. Also, having a reset style sheet really helps make your page render the same or very similarly in every browser.
A little patience and some effort really make table-less design simple, easy, and effective. - MtheoryX, on 11/14/2008, -0/+1You can always call the parent id, and then get the elements by type within that parent id.
Anyway, there are always ways around these sorts of things, and the JS frameworks typically abstract away these differences. - rpong1981, on 11/13/2008, -0/+1"Use standard conventions for common ids ... The header is called #header, the footer is called #footer, and the main menu is #nav or #navbar... It’s best to follow what others are doing, rather than inventing your own names. Sticking to conventions means other developers will be able to understand your code."
I agree for the most part but one should name space their code whenever possible. For instance, #header_digg, #footer_digg, #navbar_digg. I often have to import CSS from corporate sites and run into conflicting CSS. If they name spaced more often then there would be less conflicts.
For example, lets say you want to use vBulletin but you want to change the header/footer. When you drop in Digg's header and it shares a common ID as Vbulletin then you run into problems - MtheoryX, on 11/14/2008, -0/+1Holy *****, I didn't know that!
- annjay, on 11/13/2008, -2/+3Great post
- woofers07, on 11/13/2008, -1/+2And you remember that 80% of the population still uses that ***** browser, and you lay in bed awake at night cursing microsoft wondering why the ***** they don't migrate to using webkit, a simple solution that would save millions of billable hours nationwide. *sigh* I'm done now
- indiancompanion, on 11/13/2008, -0/+1center tags just seem too boring for me, i like aligning everything the way i like
- OutThisLife, on 11/13/2008, -0/+1CSS is easy regardless of how many lines.
- winry, on 11/13/2008, -0/+1i only use id instead of class when javascript is needed
- theGoogle, on 11/13/2008, -1/+2if you like that, you should check out eric meyer's reset css
- MWeather, on 11/13/2008, -0/+1Has something recently changed in the css and html specifications? Other than browser quirks, there's not much to keep up on.
- TriplePlay2425, on 11/14/2008, -0/+1I also am a little of a web dev hobbyist, although I haven't done much lately.
But I wasn't saying "why does anyone like CSS and web developement", I was saying why does every single Digg user seem to be a major fan of CSS and obsessed with any and all links regarding improving CSS skills.
Every single page about CSS posted to Digg makes front page. That's my point. I'm very surprised that everyone on Digg seems to be very interested in CSS tips and tutorials.
Protip: To get a submission to front page, find a CSS article that hasn't already been posted. Heck, one that's already been posted might even make it anyways. It probably would. -
Show 51 - 81 of 81 discussions



What is Digg?
Check out the new & improved