Search Blog Posts

Posts Tagged ‘XHTML’

Shorthand CSS - a few simple tips!

Saturday, June 7th, 2008

Anyone who works with css knows the great potential and flexibility that it has given designers, enabling us to create beautifully designed and well coded websites. By taking advantage of simple css shortcuts (e.g a line of code relating to one property) you will be able to reap the benefits of time saving and effective code, not only helping you create, but also eliminate any issues that might arise and also make updating much faster.

A common assumption by newbie cssers is to specify each individual property line by line (this is by all means not wrong, but it is however a longwinded way of writing your css). Below in the next set of examples i will try to explain some of the basic methods for shortening your css.

Inefficient code
#selector {
margin-top:25px;
margin-right:0px;
margin-bottom:25px;
margin-left:0px;
}

Efficient code
#selector{
margin:25px 10px 25px 10px;
}

As you can see we have manage to shorten the css styling from 6 lines to only 3. The way this works is by setting the properties in order: Top, Right, Bottom and then Left.

Similarly to simplify your code further you could use the following for the padding attribute:
Even more eficient code
#selector{
margin:25px 10px;
}

This works by setting the top and bottom margin to 25px and the left and right margin to 10px;

If the all of the attributes are the same (e.g top, right, bottom and left) you can simplify your code once again:

#selector{
margin:40px;
}

The example above shows an example where a 40px margin is required on the top, right, bottom and left of your div.

This method isn’t just used for the margin attribute it can also be used for things such as padding and the same principle can be carried into things such as font, background, border etc. Below i will show some example of long winded css compared to shorthand css.

Fonts

Example 1
#selector {
font-weight: bold;
font-family: verdana;
font-size: 115%;
}

Example 1 in shorthand
#selector{
font: bold 115% verdana;
}

Background

Example 2
#selector {
background-color:#003366;
background-image:url(images/background.gif);
background-position:top;
background-repeat:no-repeat;
}

Example 2 in shorthand
#selector{
background:#003366 url(images/background.gif) top no-repeat;
}

Borders

Example 3
#selector {
border-weight:1px;
border-style:solid;
border-color:#ffcc00;
}

Example 3 in shorthand
#selector{
border:1px solid #ffcc00;
}

As you can see the above examples show a clear demonstration of how to code more efficiently.

Body is your friend

Another common mistake that i often see when editing other peoples work is the constant use of font this, font that, and its used on nearly every div, or element of the xhtml document.

For example
#mydiv{
font-family:Arial, Helvetica, sans-serif;
font-size:62.5%;
font-weight:bold;
}
.mytextarea{
font-family:Arial, Helvetica, sans-serif;
font-size:62.5%;
font-weight:bold;
}

By utilising the body tag correctly you can save your self a lot of hassle and extra code.
Simply start by setting everything in the body tag like below:
body{
font:bold 62.5% Arial, Helvetica, sans-serif;
colour:#000;
}

Additionally if you know that you want everything to have the same font, whether it be an input element or just a standard div, make use of the star hack:
*{font-family:Arial, Helvetica, sans-serif;}
To find out more regarding the star hack click here

How to Validate an Entire Website - XHTML, CSS, RSS & Links

Saturday, March 29th, 2008

So you’ve just build your complete website and its almost read to go live…. but have you validated it making sure its compliant to w3c standards?

Where to validate

Of course you can head straight over to the w3c.org website where you can:
Validate your XHTML
Validate your links
Validate your CSS
Validate your RSS/Feed

But fingers crossed someone has already or they are working on creating an all inclusive validator to do all of these things in one go.

Dont forget to spell check!! I advise you use the default spell checker in what ever software you are using to create your website, another way you could check is by using an online checker such as http://www.wellho.net/demo/spell.php how ever please bare in mind that this is a free service and only checks single pages.

In my travels i also stumbled accross the WDG HTML Validator, which is available at http://htmlhelp.com/tools/validator/ not only can you check a websites validation, you can check to see if the entire site is validating, this is also very hand as one of its features enabled you to see if your internal pages are linking to pages that dont exist.

Why validate?

Well there are many reason too validate, take a look at the following website for an explanation of reasons to validate - click here to read more.

Give it a go, it worked well for me.

New Design, the start of a new era!!

Wednesday, March 5th, 2008

So at last the new website design has been implimented! Out with the old design, in with a much a more robust framework, gallery and blog. Clean XHTML and CSS all round, and what i believe to be a much nicer designed site. It’s taken about 20 designs, 3 version builds, 120 days, ive lost count how many hours but the website is now live.

So what’s new and better about it?

The website has many new features, from a user perspective and mine. Tackling pngs was one of the most challenging aspects of the design, making the transparency work across multiplue browsers, new and old caused a few issues but nothing that couldnt be sorted.Just a few of the sites new features:

  • New design, a fresh new look
  • New design and build rates, hosting options and services
  • New Client login section, new and existing clients can now watch their designs grow. This is probably the biggest section that has been added but the new functionality allows a much smoother working process between us and the end client.
  • Improved Search Engine Optomisation
  • Fully integrated Photography Gallery
  • Fully integrated Blog
  • New emailing system
  • Stable framework

If you have any comments id love to hear them.

How to Test your Websites Loading Speed

Tuesday, February 19th, 2008

After stripping and streamlining my xhtml, css, javascript, php and images for the design and launch of the new website i thought id do a little hunting for a decent website speed checker.

I managed to find ‘Web Page Analyzer‘ which is a free web page analysis tool that calculates page size, composition, and download time and gives speed recommendations based on best practices for usability, HCI, and website optimisation.

This was not only good for showing the data that i was after but it highlighted files that were larger than first expected and pointed out a couple of small but non important errors.

Give it a go.

Dobwalls Adventure Park Site Launch

Saturday, September 29th, 2007

So the new website has been launched for Dobwalls Adventure Park, marking a new era for the park and the future of it’s development.

The new design now includes detailed information regarding the recent closure and development plans for 15 contemporary lodges and a £5.5 million pound culture centre.

Created in XHTML and CSS.

Take a look at www.dobwalls.com

Falcon Ridge - New project - New Client

Monday, September 17th, 2007

Today we begin work on the new Falcon Ridge website for Dobwalls Adventure Park in Cornwall.

The site is going to be created using XHTML and CSS.

Here is a small screen shot of the homepage visual that will be used throughout the site.

Dobwalls adventure park - Falcon Ridge

© Copyright 2003-2008 Minimalistic Designs | Terms | Links | Sitemap
Website Design Liskeard - www.minimalistics.co.uk