Quick tip: Overriding the CSS in Telerik controls

Thought I’d pass this along – nothing to earth shattering, but it should save you some headaches!

When attempting to modify the layout and styling for most Telerik controls, you’re better off disabling the embedded styles that come with it, rather than fighting to override everything with your CSS.

To accomplish this, ensure the following parameters are set on the control, as shown in the example below:

<telerik :RadTreeView ID="archiveTreeView" ShowLineImages="false" runat="server" EnableEmbeddedBaseStylesheet="False" EnableEmbeddedSkins="False"></telerik>

The two parameters that disable the CSS are EnableEmbeddedBaseStylesheet and EnableEmbeddedSkins

Once these two parameters have been invoked You should be good to go!

Posted in Quick Tips | Tagged , , , , , | Leave a comment

Site Launch: LG – Make Life Shine | Make Life Pop

LG_MakeLifePopShine_Home

During the past couple of weeks, I’ve had the opportunity to work on the front-end development on a really cool project for LG. It’s a micro site called LG – Make Life Shine | Make Life Pop that promotes two of their new phones – the LG Shine Touch (KM555) and the LG Pop (GD510).

Mike and Zach - Make Life Pop! One of the more interactive parts of the site is a small application that ‘pops’ your photo. Basically, you can upload a photo from your computer and the application will ‘popify’ it, much like you see in the example on the right. At the end of the process there is the option to integrate the photo with your Twitter and Facebook accounts to encourage users to share/promote this site with others in their network.

Like any project, there are always learning experiences, but with this particular project it was more the confirmation of a new ‘best practice’ I’ve recently implemented that stood out the most. Since the start of this year, I’ve slowly been making the switch from using background images for headings and titles (that use a non-standard font) to a fairly new JavaScript-based technique called Cufon.

Why is this such a big deal? Consider the following.

  • Time: Plain and simple, it saves time. Think about how much time is wasted when using background images. First you have to open the PSD, create a slice, save the newly-created slice as a graphic file and then create the necessary CSS rules to display and position. Never mind the fact that the text for the graphic header could change – then you’re forced to repeat the whole process!
  • File size: Not a big deal on a smaller site like this, but you think of a typical (?) 20-30 page site, that is a lot of background images that would need to be created. Sure, you can use an image sprite, but the fact remains that Cufon generates a font file (JavaScript) that is smaller than the combined weight of all the background images you would normally need to generate.*
  • Accessibility: Using background images for page headings/titles are notorious for causing accessibility issues. Consider the fact that a user has images turned off, they will see nothing – just a blank rectangle where the image is being ‘displayed’. With Cufon, it obviously requires JavaScript to function properly, but in the case where a user does not have it enabled, the text will still appear with the regular font face that was defined in the CSS.

*Note: In the case of this project, the resulting JavaScript file was quite large (176KB), due to the multiple font styles (regular and bold) that were used. However, once gZip compressions was turned on at the server level, this number shrank to only 43KB.

If you’re not already incorporating a technique like Cufon in your front-end design, now may be the perfect time to make the switch!

Posted in Worklife at High Road Communications | Tagged , , | Leave a comment

Using a unitless line-height to enhance your typography

I came across a fairly old article on Web typography (by Eric Meyer) this morning that I found pretty interesting and thought I would share some of my feelings on the subject matter.

Up to this point I’ve been doing things completely different. To ensure consistency through the layout, I set a base font size of ‘x’ pixels on the body tag. Any element in the page that requires a different height gets sized accordingly:

body {
font: normal 13px/19px Arial, Helvetica, sans-serif;
} 

h1 {
font-size: 20px; line-height: 23px;
}

This method works, but it is hardly convenient. Each time I need to change the font size (or add in a new rule that has a varying font size), I need to update the line-height to ‘match’.

Generally, using a line-height that is 3 pixels larger than the actual size of the font seems to be a good practice to follow.

Now, thanks to this tip by Eric Meyer, using a unitless line-height will really simplify things within the style sheet. So, instead of basing a fixed-sized line-height, as I did in the past (and as shown in the CSS snippet above), I can just do the following:

body {
font: normal 13px/1.46 Arial, Helvetica, sans-serif;
}

What does this mean (in case you were to lazy to read Eric’s article!)?

Simply put, I take the size of the font and multiply it by a value (in this case 1.46) to produce the desired line-height (19 pixels).

What about different-sized fonts that are used throughout the page? They will take care of themselves – no need to manually assign an ‘extra’ line-height value to them. The multiplier (1.46) that is defined on the body tag will take care of this for you.

A pretty cool tip – one that I wished I had known a long time ago!

Posted in CSS, Quick Tips | Tagged , , , , , | Leave a comment

iStudio becomes High Road Communications

iStudio_Joins_HighRoad Talk about starting the new year with a bang! Here are at iStudio, we are absolutely pumped to announce that we have joined with High Road Communications.

“We are thrilled to share that today, iStudio is joining High Road Communications. We are merging into one company, under the High Road Communications brand, bringing to reality a fully integrated communications agency, with best-in-class PR, social media and digital services.”

Source: istudio.ca

Read more about this announcement on iStudio’s blog, or check out a short video which gives more details on this announcement on the High Road web site’s home page.

On a personal level, I couldn’t be happier with this news as I think of all the exciting work and projects that will come as a result of this. This year – and the future – are truly going to rock!

Happy New Year – indeed!

Posted in Personal / Home Life, Worklife at iStudio | Tagged | Leave a comment

Plugin bugs, or “gotcha’s”, when used in WPMU

In the days leading up to the Christmas break I was involved in creating a WPMU-powered WordPress blog for one of our clients. This was the first time we (iStudio) or I had used this product, so as you might expect there were a few growing pains that were encountered along the way. Since I spent so much time trying to fix them, I thought it would be a good idea to document a couple of the more annoying ones.

WPML and Kubrick – a story of hate

My common practice when creating a WordPress theme is to take the default one – Kubrick – and customize it to suit the requirements of the project it is for. All went well until I installed the multilingual plugin of choice, WPML. Not only did the language switching fail, but the page would go all 404 on me unless I inserted a trailing slash (‘/’) at the end of the URL. Hardly ideal.

The solution – and please don’t ask how I came to this because its not good memory – was to delete everything (except the junk about widgets at the top) in the function.php file. Once I did that, everything magically worked. I say magically becuase I really have no clue what was causing the error to occur within the functions.php file. As long as it works, that’s good enough for me.

Customize plugin, save, and….uh, it’s gone!

This issue occurred with two or three plugins that I had to use for this project. The problem happened when making any customization to the plugin via the dashboard. For example, WP-Polls has a number of options that can be configured from the WordPress dashboard. However, when I went to save my changes, the form would kick me back to the main ‘parent’ blog of WPMU, and not the ‘child’ blog that I had been configuring the plugin on. This was actually an easy one to fix, but because of my bleary-eyed and brain-dead state it frustrated me over the course of a weekend (and no, I didn’t spend an entire weekend trying to fix it – just a few minutes at a time before I would quit and mutter a few ‘cheerful’ words).

I solved this problem by just changing the target URL of the form’s action attribute. In the cases where the plugin was failing, it was always due to the URL pointing to the main wp-admin folder, and not the actual wp-admin folder for the blog being customized. I updated the target and we had ourselves a winner.

Posted in CMS, Web Development, WordPress | Tagged , , , , | Leave a comment