background preloader

Css

Facebook Twitter

Write a well structured CSS file without becoming crazy. Big CSS files can be complex to manage but a good structured code can help you to make your life simpler. This is a descriptive post about how to write a well structured CSS file. I already spoken about code readability in CSS files, but after several most specific requests about this argument (mainly about the difficult of some readers to manage CSS file with a big quantity of layout elements), I decided to illustrate the process I use in these cases. I experienced, proceeding without "order" or a clear vision about what you want to realize can be harmful and you risk to add, change, remove classes and properties, with the only result to have untidy code with a lot of unused elements on your final product.

Before you start writing directly CSS code, I suggest you to prepare a "draft" with all sections your site will have. 1. Be simple Avoid everyting is not strictly necessary. Don't write a "book" about a div ID called #column-left. Let's go. Body, h1, h2, h3, p, ul, li, form - Yahoo! HowTo: Drupal 7 Sub-Theme Creation, Step-by-Step | Open Source CMS Pro. Sub-themes rock. Learn how to use this theming technique and your life — at least your Drupal theme related life — will improve markedly.

Sub-themes make it possible for you to customize existing Drupal themes without hacking the code of the original theme, and they make the creation of new themes simpler by letting you start with a base theme and build on it, thereby saving you valuable time and avoiding the need to re-invent the wheel. But perhaps I am getting ahead of myself — for those of you who are new the Drupal, the concept of sub-themes may not be familiar, so, let’s take one step back and start at the beginning: A sub-theme is simply a theme that is based on another theme. For two reasons: First, sub-themes inherit properties from the original theme (commonly known as the “base theme”). This means that you can create a new theme that uses the functionality and styling of an existing theme without having to create all that functionality and styling on your own.

Update the file. Mike Davidson - Make Your Site Mobile-Friendly in Two Minutes. After checking out B. Adam Howell’s excellent IYHY.com site a couple of weeks ago, I thought it might be a good idea to write a little tutorial about how to make your entire site more mobile-friendly without even touching your pages. You may think that since you write valid code and separate structure from presentation at all times, your site already works great on mobile devices.

You may also think bad things don’t happen to good people. In both cases, you’d be wrong. The fact of the matter is that the state of HTML rendering in the wireless world is all over the map right now. What’s really needed until HTML/CSS/JS support is improved in mobile devices is a little server-side filtering. And you know what? Four easy steps Outlined below are the four steps to get this done in a matter of minutes, provided you are in an Apache environment and can run PHP. Step 1: Set up a domain mirror Step 2: Create global_prepend file Changes all URLs to “mobile”-ized URLs. <br /> <? A look at the results. Wildly useful free Web development programs | C82: Words of Nicholas Rougeux. There are probably tens if not hundreds of thousands of programs out there for almost anything you can imagine and a small portion of those are geared solely toward Web development but they're not all top notch. Now, when I refer to Web development, I mean all sides of it including graphics, coding, and everything else.

Sure, there are the usual players like the Adobe/Macromedia products but what I enjoy the most are the small free programs that someone made in their free time and decided to release to the world in case anyone else might need them. These sometimes require some hunting down to find and can be well worth it. I thought I'd take some time to share some of my favorites and hopefully learn about some more from my readers. I've been involved in Web development since 2000 but not seriously and professionally until a little over a year ago. I'm amazed at what I've picked up during this small period of time and have enjoyed every bit of it.

Firefox Web developer toolbar MeasureIt. Create a Killer band site in Drupal – Part 1 – Design. .htaccess Tutorial. Introduction In this tutorial you will find out about the .htaccess file and the power it has to improve your website. Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file.

Will My Host Support It? This is probably the hardest question to give a simple answer to. Many hosts support .htaccess but don't actually publicise it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it. A good sign of whether your host allows .htaccess files is if they support password protection of folders. What Can I Do? Creating A .htaccess File Warning Custom Error Pages Part 2. xNeat Windows Manager.

CSS Text Properties.