Polls

Which Linux distribution do you primarily use on your machine?
 
 
CSS


Integrating CSS techniques into ASP.NET 2.0 applications E-mail

The struggle between the standards community and Microsoft is ongoing. There has been significant progress, as evident with the recent news of the next version of IE8 moving towards compliance.

Microsoft has embraced standards like JavaScript and CSS with its development tools as well. CSS is now the accepted approach to styling Web interfaces, and ASP.NET makes it easy to integrate CSS into your solutions.

There are a variety of ways to implement CSS when building ASP.NET Web applications. A few ways to incorporate CSS in ASP.NET is via standard CSS (inline or external), the CssClass property, themes, and CSS control adapters. I'll go into more detail about the CssClass property and themes after taking a look at standard CSS. (This article is specific to ASP.NET 2.0.)

Read more...
 
CSS margins and paddings problem E-mail

This is a common question in the CSS forums and one I encounter almost on a daily basis. Therefore I am going to go right back to basics for this article and explain the fundamental reason why your site may look slightly different in various browsers.

 

Margins and Padding

One of the main causes for the many positional differences between layouts in various browsers is due to the default stylesheet each browser applies to give styling to certain elements. This usually involves setting default margins and padding to some elements to make them behave in a certain way.

For instance, paragraph (p) tags will have a margin applied to them so that each paragraph is separated by vertical white space and do not run into each other. The same applies to many other tags including heading tags (h1 etc). The problem occurs because the amount of margin (or padding) applied to these elements is not consistent across browsers. On many occasions Mozilla/Firefox will add a top margin to the element as well as a bottom margin. IE will however only add a bottom margin. If you were then to view these two browsers side by side you would see that the alignment would be different due to the top margin applied by Mozilla which could make your design not line up as expected.

In some designs this may not be a problem but in cases where position is important, such as aligning with other elements on the page, then the design may look bad or at least not as expected.

Read more...
 
10 Quick Tips for an Easier CSS Life E-mail

As with most things, a logical and structured approach is the best way to go.

 

1. Keep it Simple

This may sound obvious but if you find yourself using complicated coding to achieve your design then you should think again about whether the feature you need is really necessary or if you're just thinking about your design and not your visitors. Too often designers get caught up in their own design and go to great lengths to produce a certain visual effect only to find later on that visitors find it either irritating or unusable.

Complex code is usually the result of muddled thinking. Plan your layout logically and work from the outside in and from the top down where possible. Look at what containers you will need and break jobs down into smaller parcels. I usually start with a page wrapper and then progress logically through the header, navigation, main content and footers etc trying to preserve the flow of the document as much as possible.

While good visual design is necessary to attract visitors you must still have good content and a usable and accessible site. If you find your html and css looks like spaghetti then have a re-think and see if you can simplify it. This will make it easier to maintain in the future and will often save code and bandwidth.

Read more...