Thursday, November 20, 2008

Stumble Upon Horror Photos

Nothing original here. But thanks to Saleel I rediscovered what pleasant accidents social media sites can cause.

Horror film enthusiasts, hover your cursor over the gallery below to see the photos I stumbled upon on FindAccidentally accidentally found on StumbleUpon.

Note that these pictures are for sale and they're not created in Photoshop, but with real people wearing makeup and costumes - or so says the author.

Now, to get to my point... if you are (or would like to become) a StumbleUpon user, don't forget to use the bookmark button below each post and rate this blog :)

Monday, November 17, 2008

New Custom Domain

So... I've changed the domain name for my blog. The new address is http://www.agawebs.com/ and the new name is AgaWebs. Sounds cool, doesn't it?

For those of you who plan on performing a similar stunt, note that it's not as straight forward as you might think. I, for one, had a bit of trouble with this migration and though I should share the things I've learnt...

Let's say you're in the same situation as I was: you own a Blogger (or Blogspot) blog, you buy a custom domain from GoDaddy and want to point it to your blog. First thing you'll do is read Google's guidelines for moving a site. You'll then read Blogger's help articles on using a custom domain for your blog and creating a CNAME record for the domain. After following the instructions in these tutorials, you'll be tempted to think it's all over and wait for DNS servers to update their records. I've done so myself and noticed that after 72 hours, the domain still wasn't pointing to my blog. Here are the full instructions I received from GoDaddy Support in order to fix this:

Dear Andrei,


Thank you for contacting Online Support.

I understand you have a question about pointing your domain name properly to your blog. I have included instructions to do so:

1. Modify the 'www' CNAME to show that it 'points to' ghs.google.com. (you have already done so.)

2. Set the 'A' record to the forwarding IP address (64.202.189.170)

3. Set up domain forwarding to the following URL: http://www.agawebs.com

To modify the A-Record for the your domain:

1. Select Domain Manager from the My Products menu.
2. Click on the domain which you wish to change the A-Record for.
3. Click Total DNS Control and MX Records.
4. Under the A (Host) section, click the pencil icon to the right of the @ record.
5. Enter the new IP address.
6. Click OK

NOTE: Changes to the settings of a domain can take up to 48 hours to become effective because of the number of networks involved, and because these networks are controlled by several different agencies. This delay applies to all domains with any Registrar. Please allow for this delay when planning web sites or configuring a domain to work with your services.

To setup or modify domain forwarding:

1. From My Products, click Domain Manager.
2. Check the box next to the domain(s) you wish to modify.
3. Click the Forward Domains button above your list of domains.
4. Select the Enabled option.
5. Enter the full URL that you would like your domain to forward to. (For example: http://www.anotherdomain.com)
6. Select the redirect type you would like for the domain forwarding.
7. Click OK.

Note: Changes to the settings of a domain can take an average of 48 hours due to the number of networks involved. These networks are controlled by many different entities and are updated independently.

Please let us know if we can assist you in any other way.


Sincerely,

Dean P.
Online Support Technician

As you can see, Blogger's tutorial is missing at least one crucial step: setting the 'A' record to the forwarding IP address. I'm not sure if the IP is the same for all domains, so do contact the very helpful GoDaddy Support staff before performing these steps. Note that domain forwading (the 3rd step mentioned in Dean's email) is used in order to make both yourdomain.com and www.yourdomain.com point to the same site. This can be performed from Blogger's admin panel as well - it's the "Redirect yourdomain.com to www.yourdomain.com" option under Settings > Publishing. However, using this option can cause further problems, so I recommend you stick only to the instructions above.

That's the full story of my new domain. I still have to change some of the links on this blog and make them point to the new addresses. By the way, if you come across any broken links or other bugs, please notify me in a comment. My Outbrain star ratings have also been reset, so please start rating again, bookmark the articles you like and subscribe to the new feeds.

Thank you for visiting my blog :)

Tuesday, October 21, 2008

Sliding Doors for MY a:hover Craft

Lately, I've been experimenting with different cascading style sheet designs for websites. One of the problems I've come across is how to create custom link buttons or tabs and add my own images on their background. Bear in mind that such links have to have a variable width depending on the length of the link anchor or on the different browser settings a visitor might have previously applied. This is all fine when the backgound picture is simply a small .gif which generates a texture. But what do you do when you want to use an image such as this?...


button skin


Note that both the left and right edges of the picture are relevant for my button. The picture is 400px wide and if the anchor text exceedes that width, the backgound is repeated spoiling the design. On the other hand, if the anchor text is shorter, the right edge isn't showing. As a pre-requisite, we're not allowed to fix this using HTML tables, but only CSS. The proper solution is a technique called "sliding doors" and I found it on Douglas Bowman's webdesign blog. Basically, you use two overlapping pictures and calculate their width so that the resulting button can contain both short and long strings. I'm not going to insist too much on this technique, but just to illustrate it clearly, I've drawn a diagram based on Bowman's explanation:


explanation of sliding doors technique


Another common CSS technique is to use the a:link, a:hover etc. pseudo-classes to create different effects when visitors hold their mouse over a link button. A good tutorial for doing this is Stu Nicholls' article on ":hover crafts". Here's my own basic example:


Button 1 Button 2 Button 3


However, when you want to apply this a:hover technique to a button that has to have an image background during the "hover" state, you run into a problem. I haven't found any articles which explain how this should be done, so after a few trials, I came up with the following procedure:

  1. I'm going to use a navigation bar to demonstrate the technique. It's good practice to place the navbar links in an unordered list, so start I'll by writing the HTML code necessary for this button list:
    <ul>
       <li><a href="#"><span>Button 1</span></a></li>
       <li><a href="#"><span>Link</span></a></li>
       <li><a href="#"><span>Button 2</span></a></li>
    </ul>
    I haven't declared any style properties yet, so at this point, the list looks like this:


    Each list item obviously contains a "<a>" tag for the link anchors. In addition to that, the link text is contained within "<span>" tags which I'm going to use as my top layers for the sliding doors - you'll understand this later.

  2. Keeping the same HTML code, I'm now going to start editing CSS properties for the list: first, remove bullets and adjust margin + padding:
    ul{
       list-style-type: none;
       margin: 0;
       padding: 0;
       }

    li{
       margin: 0;
       padding: 0;
       }
    Result:



  3. I want this to be a horizontal navbar, so next I'm going to display the list items inline (changes are highlighted in bold):
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }
    Result:



  4. I'm now going to set a fixed height for the navbar, plus a red background in order to point out its shape:
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       background-color: Red;
       height: 30px;
       overflow: hidden;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }
    Result:



  5. By now, there's a need to adjust the padding of these buttons. So I start off by adding some padding on the left side of the anchor:
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       background-color: Red;
       height: 30px;
       overflow: hidden;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }

    li a{
       display: block; /*display the achor as a block*/
       margin: 0;
       padding: 0 0 0 10px;
       }
    Result:



  6. The remaining padding can be adjusted by editing the properties of the "<span>" tag. I'm also going to set a green backgound for it in order to display its shape clearly:
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       background-color: Red;
       height: 30px;
       overflow: hidden;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }

    li a{
       display: block; /*display the achor as a block*/
       margin: 0;
       padding: 0 0 0 10px;
       }

    li a span{
       display: block;
       margin: 0;
       padding: 4px 10px 10px 0;
       background-color: Green;
       }
    Result:



  7. Setting the "a:hover" behavior - this is the part where I can actually apply the "skin" for my buttons. Since the "<span>" entity is the top-most layer, I'll use it to dislay the main part of the button and its right edge. The "<a>" tag will be used to render the left edge only:
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       background-color: Red;
       height: 30px;
       overflow: hidden;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }

    li a{
       float: left; /*this ensures the entire button is clickable*/
       display: block; /*display the achor as a block*/
       margin: 0;
       padding: 0 0 0 10px;
       }

    li a span{
       display: block;
       margin: 0;
       padding: 7px 10px 10px 0;
       background-color: Green;
       }

    li a:hover{
       background: url(button-bg-gradient.gif) left top;
       }

    li a:hover span{
       background: url(button-bg-gradient.gif) right top;
       }
    Result (hover your mouse over it to see the changes):



  8. OK, we're nearly there. All the navbar needs now is a proper background and some finishing text-formatting touches:
    ul{
       float: left;
       list-style-type: none;
       margin: 0;
       padding: 0;
       background: url(bg-gradient.gif);
       height: 30px;
       overflow: hidden;
       }

    li{
       float: left;
       margin: 0;
       padding: 0;
       }

    li a{
       float: left; /*this ensures the entire button is clickable*/
       display: block; /*display the achor as a block*/
       margin: 0;
       padding: 0 0 0 10px;
       cursor: pointer;
       text-decoration: none;
       color: White;
       font-family: Tahoma;
       font-weight: bold;
       text-transform: uppercase;
       font-size: small;

       }

    li a span{
       display: block;
       margin: 0;
       padding: 7px 10px 10px 0;
       cursor: pointer;
       }

    li a:hover{
       background: url(button-bg+gradient.gif) left top;
       }

    li a:hover span{
       background: url(button-bg+gradient.gif) right top;
       }
    Result:




That's about all there is to it. You can use this technique to also create skins for the inactive state of your buttons.

Note that the text above is already formatted, so you may encounter problems if you copy that code into the source code of your website. Instead, I recommend you copy the final code from the text boxes below:

HTML:

CSS:


There are plenty of examples of such navbars on Stu Nicholls' site (see above). Furthermore, one can deduce the technique by simply looking at the source code of a site that uses it. However, I felt a clear explanation was needed and I hope I've accomplished that with my article. Please share any better tutorials you may find and let me know how this works out for your site.

Friday, April 25, 2008

Piatra Craiului

Cheile Zarnestiului si Piatra CraiuluiCheile ZarnestiuluiPiatra Craiului - Ref. Grind
La Om
BranCreastra Pietrei Craiului
La Curmatura
 
<ecoXtrem>
Prin padure
Locomotiva
Horn
Cabana Curmatura noapteaPadurea in ceata
Caine albRapel
</ecoXtrem>

Thursday, April 17, 2008

Images from Piatra Mare

November 2005

cascada 7 scari - 7 stairs waterfallcanionul 7 scari - 7 stairs canyon: looking upwardscanionul 7 scari - 7 stairs canyon: looking downwards
forest track in Piatra Mare: in winterpeople at the Piatra Mare cabin: in wintermy tent covered in snow near the Piatra Mare cabin
view from Piatra Mare: in winterforest in Piatra Mare: in winter

May 2006

<by Tavi>
people preparing for a barbecue in Piatra Mareview from Piatra Mare: river and forest in summerclowds in the sky above Piatra Mare
view from Piatra Mare: river, forest and mountain in summerview from Piatra Mare: river, forest and mountain in summerview from Piatra Mare: forest and mountain in summer
</by Tavi>

February 2008

<by Specian>
icy rock face in Piatra Mare: in winterpeople climbing the stairs from the 7 stairs canyon
</by Specian>
 
<by Cristi>
people climbing an ice block in Piatra Marenear the 7 stairs canyonfresh water spring
returning from 7 stairs: in winterpreparing to climb an ice block in Piatra Mare
</by Cristi>