Archive for the 'Coding' Category

Floating an Image Outside a Container

Monday, April 12th, 2010

.floating-image
One of my recent issues was that I needed to extend an image outside a DIV container, and spill out into another one, like is shown in the picture. I was able to accomplish this by manipulating the margin values in CSS as such:

#div {
margin-right:-60px;
}

You may need to adjust the top/bottom to achieve what you want. In order for things to work right in Internet Explorer, you will need to add this in the image tags:
style=”float:right;” src….

Extending a Sidebar All The Way Down

Saturday, November 7th, 2009

This is an issue I’ve had some trouble with, and finally spent some time to figure it out.

The problem is, when trying to make a sidebar, the sidebar would not extend all the way to the footer unless there was content in it. In order to fix this, you need to do two things in your CSS.

1st, you must define your body to have a height of 100%. Then, in your sidebar div you then define that with a height of 100%. YOU MUST BOTH OF THESE. Here is what it should look like:
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
/* Allow IE/Win to resize the document */
font-size: 80%;
color: black;
background: #ffffff;
margin: 0;
padding: 0;
border: none;
height: 100%;
}
#sidebar {
width: 340px;
float: left;
clear: both;
margin-bottom: 4em;
padding: 20px;
height: 100%;
}

Contact Form on Joomla….ARGHHHH!!!

Thursday, January 18th, 2007

On one of my sites, I decided to go with Joomla. I liked the idea of Joomla because of the ease of installation, plus it was an overall fit for the site theme.

One of the problems I am encountering is making the contact form functional. It seems as though no matter the functions I choose, nothing will work. I have to suspect that my host, Dreamhost has something to do with it.
Joomla Email Contact Form
I went to their wiki, and found some good examples. However, I set things up as shown in my image and the mail never get to me. I have tried several different email addresses on different servers, and nothing works. This will prove to be an ongoing dilemma and more than likely will be posting again on it!

Adsense Code in Smarty

Saturday, January 6th, 2007

I own several websites that are link directories. Most of them are run on the phpLD Link Directory script. One of the more challenging parts of maintaining and getting these directories going is dealing with Smarty. Before I knew any better, I would get frustrated when trying to add code, then not seeing the end result on the page displayed.

Smarty does weird things, as I’m still learning and understanding.

A prime example of this is adding Adsense code to template files. I was attempting to add Adsense code to one of my templates, and I simply added my Adsense code.

The result was not what I planned. The ads displayed, but were not correct as shown here.(Image at 75% scale)

Adsense Code with Smarty

The ad just didn’t look right, and it seems as though the “ads by Google” text was missing.

After doing some investigating, I learned that I had to add “literal” tags around the code as such:
{literal}
Adsense code
{/literal}

This was much better, as it produced the desired ad:

Adsense ads with code

I still run across confusion when I attempt to do other things similar, and still cannot figure them out. These are growing pains, I’m sure as I will eventually grow out of them.

Snap Preveiw

Tuesday, January 2nd, 2007

Snap Preview

Several days ago, I came across a site (I don’t recall where) and noticed the new service by Snap. It’s a link preview box that opens when you hover over an active external link from a website.

I liked this feature. I think it adds something that benefits the viewer of your site.

I was amazed at how simple this feature is to add to your site.

To get this working on your site, all you have to do is visit the Snap website, enter your url and a valid email address then you are given a code to place before your /head tag.

I have since added this feature to several of my sites, including this one.