admin
This user hasn't shared any biographical information
Posts by admin
Vector Sun Rays – made EASY!
Aug 11th
In my most recent website design i had to create a sun ray.
I came across this very easy method of producing such a thing without going to the lengths of drawing each segment individually and rotating.
Before you start make sure you set your Fill color to None and Stroke color to Black (or whatever color you prefer).

Step 1
Draw a circle. I opted for 100px x 100px.

Step 2
From the Menu bar select Window > Stoke (Ctr+F10). This will bring up the “Stroke Panel”. Click on the Show options button to view all the Stroke options. These settings will be requried at a later stage.

Step 3
First of all, add a “Stroke Weight” of 100px to match the diameter of the circle.
Now select “Cap: Butt cap”, “Corner: Miter join” and “Align Stroke: Align Stroke to Center”.
This should ensure that the stroke will fill the entire circle to give the impression the circle is infact whole.

Step 4
Now click on “Dashed Line”. This will turn the circle in to rays (of light).
Be sure to also select the option “Aligns Dashes to corners and path ends, adjusting lengths to fit”. This very simply means that the rays will appear evenly spaced.
You can play around with the dash spacing (for this example i have used 12pt).

Step 5
Finally, to be able to edit the ray to your hearts content – we need to make the stroke a graphic. To do this simply select (from the Menu bar) Object > Path > Outline Stroke. This will allow you to apply things like gradients etc etc.

Fluid Image Container
Aug 1st
One request that always sticks in my mind was:
“can you make for me a liquid container? But the border must be an image!”
Strange request you will agree, but that is developers for you!
Usually in most cases you would use a very simple mozilla border: View Example
#container{
border: 8px solid #000;
-moz-border-radius: 30px;
border-radius: 30px;
/*The following are for this blog entry only*/
width:90%;
height:300px;
margin:auto;
/*The previous are for this blog entry only*/
}
Bare in mind that older browsers tend not to like this technique (the rounded corner are removed to show square corners)
You may ask then why this “developer” made such a request (I know i did).
But as with anything he had a good reason… He wanted an image border so that in future he could have ANY graphic for the border.
He wanted gradients, multiple colours etc etc None of these can be achieved by simply applying a mozi border.
Example:
View Example
For this example i have kept the graphic simple – use you iamgination to what could be possible.
CSS:
.popup_default {
width:90%;
margin:auto;
}
.popup_default .top-left {
margin: 0px 35px 0px 0px;
background-image:url(fluid_border.jpg);
background-position: 0px 0px;
height: 35px;
}
.popup_default .top-right {
margin: -35px 0px 0px 35px;
background-image:url(fluid_border.jpg);
background-position: 100% 0px;
height: 35px;
}
.popup_default .bottom-left {
margin: 0px 35px 0px 0px;
background-image:url(fluid_border.jpg);
background-position: 0px -35px;
height: 35px;
}
.popup_default .bottom-right {
margin: -35px 0px 0px 35px;
background-image:url(fluid_border.jpg);
background-position: 100% -35px;
height: 35px;
}
.popup_default .inside {
border-left: 8px solid #00A0FF;
border-right: 8px solid #00A0FF;
background: #FFFFFF;
padding-right: 10px;
padding-left: 10px;
}
HTML:
<div class="popup_default ">
<div class="top-left"></div>
<div class="top-right"></div>
<div class="inside">CONTENT GOES HERE !</div>
<div class="bottom-left"></div>
<div class="bottom-right"></div>
</div>
Sprites v2
Jul 31st
In a previous post regarding sprites i talked about having a single image that contained two graphic elements.
On rollover the CSS would simply move the sprite a number of pixels to reveal the second part of the graphic – acting like a rollover statement.
With this tutorial all we are going to do is use ONE image to display SIX of icons.
Rather than creating six individual icons and loading them all into the page. We have created one graphic that contains all of the six icons. We are then simply going to ask the CSS to display the image we choose at any given time.
On completion we should see something like:
![]()
This is slightly more advanced than i originally intended as we are also going to include rollover graphics.
Example: click here to see a working example of Sprites v2
CSS:
.container{
width:600px;
height: 100px;
}
.container ul{
padding:0px; margin:0px;
}
.container li{
float:left;
}
/*********** Individual Containers ***********/
#computer, #save, #shop, #music, #search, #file{
width:100px; height:100px;
text-indent:-5000px;
list-style:none;
}
#computer li, #save li, #sho lip, #music li, #search li, #file li{
font-size:14px;
height:100px;
}
#computer a, #save a, #shop a, #music a, #search a, #file a{
background-image:url(http://henryharold.co.uk/images/blog/6xsprites.jpg);
background-repeat:no-repeat;
display:block;
height:100px;
}
#computer a{background-position:0px 0px;}
#save a{background-position:-100px 0px;}
#shop a{background-position:-200px 0px;}
#music a{background-position:-300px 0px;}
#search a{background-position:-400px 0px;}
#file a{ background-position:-500px 0px;}
#computer a:hover{background-position:0px -100px;}
#save a:hover{background-position:-100px -100px;}
#shop a:hover{background-position:-200px -100px;}
#music a:hover{background-position:-300px -100px;}
#search a:hover{background-position:-400px -100px;}
#file a:hover{ background-position:-500px -100px;}
HTML:
<div class="container">
<ul>
<li id="computer"><a href="#">computer</a></li>
<li id="save"><a href="#">save</a></li>
<li id="shop"><a href="#">shop</a></li>
<li id="music"><a href="#">music</a></li>
<li id="search"><a href="#">search</a></li>
<li id="file"><a href="#">file</a></li>
</ul>
</div>
……………………………………………………………………………………………………………………
Sprite v2 Alone – Display a single icon only
In most cases you will not wish to display ALL six icons next to each other. All that is required is that you create a new container with the CSS that places it in an appropriate location on the page.
Example: click here to see a working example of Sprites v2 Alone
From the CSS above you simply need to replace the
.container {}, .container ul{} and .container li{} (and all the options)
with
CSS
.container_lone{
width:100px;
height: 100px;
}
.container_lone ul{
padding:0px; margin:0px;
}
.container_lone li{
float:left;
}
In the HTML you can pick and choose which icon to display by adding the appropriate “li id”.
HTML
<div class="container_lone">
<ul>
<li id="shop"><a href="#">shop</a></li>
</ul>
</div>
Animated dropdown menu with jQuery
Jul 31st
Throughout my time of creating websites, i have always tried to test my skills on every project.
Like every designer i can trully say that i havn’t always been happy with every design i have created, but at least i can live with the knowledge that i have done something new on every project.
Here is an exmple of a dropdown menu using nothing more than jQuery, CSS and HTML.
Desired Outcome:
The outcome of this can be seen here: jQuery dropdown
jQuery:
Download the jquery.js: here
CSS:
.container{
float:left;
width:314px;
}
.container img{cursor: pointer;}
ul, li{
margin:0;
padding:0;
list-style:none;
}
.menu_head{}
.menu_body {display:none;}
.menu_body ul{margin:0px; padding:0px;}
.menu_body li{}
.menu_body li.alt{}
.menu_body li a{
color:#FFFFFF;
text-decoration:none;
padding:10px;
display:block;
}
.menu_body li a:hover{}
.p_txt, .p_txtbot{
color:#FFFFFF;
margin:0px;
padding:0px;
background-image:url(http://henryharold.co.uk/downloads/nav_default.png);
font:Arial, Helvetica, sans-serif;
padding-left:10px;
padding-top:10px;
}
.p_txtbot{
padding-bottom:10px;
}
HTML:
<head>
<title>Animated Drop Down Menu with jQuery</title>
<link href="content.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function () {
<!--$("ul.menu_body li:even").addClass("alt");-->
$('img.menu_head').click(function () {
$('ul.menu_body').slideToggle('medium');
});
});
</script>
</head>
<body>
<div class="container">
<a href="#"><img src="http://henryharold.co.uk/downloads/nav.png"
width="314" height="36" class="menu_head" /></a>
<ul class="menu_body">
<p class="p_txt">HenryHarold<br />
Manchester<br />
Somewhere</p>
<p class="p_txtbot">Web: www.henryharold.co.uk<br />
Email: chris@henryharold.co.uk</p>
</ul>
</div>
</body>
</html>
Sprites
Jul 31st
Recently i have come across a number of websites that are still using two images for one navigation tab. By this i mean that on rollover the css is loading a completely new image. This can result in the navigation flickering if the user’s internet is slow.
This can lead to a bad user experience… and generally look quite shabby.
A sprite is simply one image that is made of two parts.
Example:

All that we are going to ask the css to do, is move the above image a number of pixels (vertically) on rollover in order to display the second part of the image. Simples.
design note: you will notice that i am using “image replacement” again so that the html text will display for screen readers and for when all styles are disabled.
Desired Outcome:
The outcome of this can be seen here: http://henryharold.co.uk
CSS
.list{
width:228px;
height:104px;
}
.list ul{
padding:0px;
margin:0px;
}
#hkl_web{
text-indent:-9000px;
}
#hkl_web a{
height:104px;
background-position:0px -104px;
background-image:url("http://henryharold.co.uk/portfolio/web/helpkidz.jpg");
background-repeat:no-repeat;
display:block;
}
#hkl_web a:hover{
background-position: 0px 0px;
}
HTML:
<div class="list">
<ul>
<li id="hkl_web"><a href="#">HelpKidzLearn</a></li>
</ul>
</div>
Welcome to HenryHarold – “My Blog”
Jul 25th
Over time i have developed and honed my own skills and abilities by using the web and other people’s blogs.
So, i think it is about time that i share some little bits of information that i have picked up, along with some of my own design. Hopefully you (the reader) will find them of interest.
Feel free to get in contact with me either for work, or if you require feedback or critique.



