"Padding-" and "Margin-" – What’s the Difference?

Many intermediate and begginer CSS designers get confused when it comes to padding and margin values. What’s the difference? They both just shift stuff, so why the different names? Don’t they do the same thing?

Although the behavior of margin- and padding- is very similary, there is one important difference: margin- is on the outside of the element, and padding- is on the inside. What this means is, one will apply the whitespace shift “after” the element begins (padding), and the other will apply the whitespace “before” the element begins (margin). Many times there is no visible difference, but sometimes there is – a big one.

Continue reading

Dynamic (PHP-Driven) CSS Style-Sheets & Web Design

Can you imagine running a website with hundreds of pages off pure, static, html? Without a single bit of server-side code? No PHP, Perl, Ruby, or even SHTML? What about a site with hundreds of thousands of pages? or millions? Of course not. So why do you put up with static CSS files then?!

Not only is Web 2.0 not just about looks, it’s also originally about clean code and putting the power of design in the hands of the coder. We have no idea why it’s taken so long for this to get through, but for some reason, people still aren’t getting it. Dynamic web languages exist for a reason. Use them. Everywhere.

It’s not difficult, as a matter of fact, it’s down-right easy. It let’s you work magic with your stylesheets, makes changing settings and certain aspects down-right simple, and above all, puts you in complete control of how your data display’s on end-user PCs.

Continue reading

CSS & Vista's New Fonts

As we reported and reviewed in our article “A Comprehensive Look at Microsoft’s New Fonts”, Vista has some spectacular new fonts – but we have a few issues with them now that we’ve tried them and implemented them with mixed success here on The NeoSmart Files and on the Forums, and here’s the problem.

They just don’t fit. The new fonts are mostly too small to be plugged right in to an existing CSS file. If you tweak the CSS so that it looks right for, say, Calibri; ten minutes later someone that doesn’t have that font is going to come around and ask your server for that CSS file – but since they don’t have Calibri installed, their browser will use the next one on the list, and unfortunately, your sizes are going to be all wrong.

Continue reading