When testing the layout of a website template that I was creating in Internet Explorer (IE) and Firefox, I had a lot of trouble getting both browsers to display the content as required.
The main content is a fixed width, which is in a panel (div) that should be centered. Setting the css property text-align to "center" works for IE, but not Firefox. After doing some research, I found that FireFox has a specific CSS attribute to center align content: "-moz-center". This fixed the problem for Firefox, but the everything was left aligned in IE. After a bit of playing around with combinations of styles and attributes I managed to have both Internet Explorer and Firefox render the page properly using the same style sheet and set of styles.
My solution:
Set the alignment for Firefox in the attached stylesheet for the required div elements:
text-align: -moz-center
Set the alignment for Internet Explorer using the align attribute of the div element:
<div align="center" >
Web Development & Programming in PHP, ASP.NET, XML, VB, .NET Framework, JavaScript and HTML/CSS for Web Applications, Internet Marketing and SEO
Sunday, May 31, 2009
IE / Firefox Alignment Issues Solved
Posted by
DanielS
at
8:05 PM
Labels:
Browser Compatibility,
CSS
0
comments
Monday, May 25, 2009
Search Engine Optimization (SEO) for Blogger
Looking to increase visits to your blog? While doing a little research around SEO for my own blogs, I came accross the following article by Mike which offers a method of adding keyword and description metatags.
Blogger SEO Tip: Use Post Labels as Meta Keywords
The code incorporates conditions to show the labels / tags for a post as keywords if a post page is being viewed. If the blog homepage or a search page is being viewed, the blogs keywords abd description are used.
Blogger SEO Tip: Use Post Labels as Meta Keywords
The code incorporates conditions to show the labels / tags for a post as keywords if a post page is being viewed. If the blog homepage or a search page is being viewed, the blogs keywords abd description are used.
Posted by
DanielS
at
12:08 PM
Labels:
Blog Tips,
SEO,
Webmaster Tools
1 comments
Saturday, May 23, 2009
XML-RPC Blog Ping
I am developing a Php script which uses the Weblog_Pinger class written in php by Rogers Cadenhead. The script currently logs all pings to a MySQL database table, but is controlled using a single php script which calls the ping_ping_o_matic function for each site. I noticed that once more than about 20 sites were being pinged, the script sometimes timed out.
Instead of adjusting settings in php.ini or the web server, I decided to implement the Weblog_Pinger class with a controller which uses a MySQL database to store addresses to servers which support XML-RPC pings. The database will also store details of the blogs / rss feeds being submitted. When commencing the bulk ping, a dialog will allow a selection from the list of blogs / rss feeds, and the "changes url" for each selection to be specified. The php interface will also allow XML-RPC servers and additional blogs or rss feeds to the database.
Instead of adjusting settings in php.ini or the web server, I decided to implement the Weblog_Pinger class with a controller which uses a MySQL database to store addresses to servers which support XML-RPC pings. The database will also store details of the blogs / rss feeds being submitted. When commencing the bulk ping, a dialog will allow a selection from the list of blogs / rss feeds, and the "changes url" for each selection to be specified. The php interface will also allow XML-RPC servers and additional blogs or rss feeds to the database.
Posted by
DanielS
at
3:13 PM
Labels:
Free Tools,
Java,
MySQL,
PEAR,
Php,
RSS,
SEO,
Webmaster Tools,
Xml
10
comments
Friday, May 22, 2009
SEO - Crawler interpreting external links
The following is in relation to my previous post Php: Log Clicks on Links to External Sites.
The post demonstrates how to log a clock on a link pointing to an external address. This may cause some search engines to get confused when crawling the page, as the link will be pointing the the load.php script on your site, when it actually reads and takes the user to an external site.
A solution for this would be to use the actual address of the external site as the value for the href attribute, and call a javascript function which changes the href value to toint to the redirect script which logs click / hit statistics. Links would then appear to search engine crawlers to point to the correct address, and not a page on your site. If javascript is not enabled, the user will still reach the required destination, but statistics for the click will not be logged.
The post demonstrates how to log a clock on a link pointing to an external address. This may cause some search engines to get confused when crawling the page, as the link will be pointing the the load.php script on your site, when it actually reads and takes the user to an external site.
A solution for this would be to use the actual address of the external site as the value for the href attribute, and call a javascript function which changes the href value to toint to the redirect script which logs click / hit statistics. Links would then appear to search engine crawlers to point to the correct address, and not a page on your site. If javascript is not enabled, the user will still reach the required destination, but statistics for the click will not be logged.
Posted by
DanielS
at
5:31 PM
Labels:
Javascript,
Php,
SEO,
Webmaster Tools
0
comments
Thursday, May 21, 2009
Php: Log Clicks on Links to External Sites
The following demonstrates a method of logging clicks on hyperlinks to external sites using Php and MySQL. This can be used to generate statistics for content on your site such as "Popular links/sites", or keeping track of a frequent user or member's actions (ie. Recently Browsed).
The Php uses the PEAR MDB2 Package to create a connection to the database. For information on installing or using PEAR and the MDB2 package, see http://pear.php.net/.
Once the processing has completed for the item/link, the user is redirected to the address of the selected url.
Posted by
DanielS
at
10:10 PM
Labels:
MySQL,
PEAR,
Php,
Webmaster Tools
0
comments
Saturday, May 9, 2009
XML Parser
The following php code processes an xml file and displays contents in the browser. Each element is displayed, followed by the name and value of any attributes. The text value will be disaplyed on if the element is not empty.
It uses various methods from the XMLReader class (php), to move through each element and attribute of the xml document displaying each element and attribute name, and any values.
It uses various methods from the XMLReader class (php), to move through each element and attribute of the xml document displaying each element and attribute name, and any values.
Posted by
DanielS
at
10:44 PM
Labels:
Free Tools,
Php,
Xml,
XML Reader
0
comments
Sunday, May 3, 2009
Free online webmaster, web development and web design tools and resources
| The following is a set of free tools and resources which can be used to help create valid and attractive websites in a short amount of time. |
Posted by
DanielS
at
6:34 PM
Labels:
Free Tools,
Utilities,
Web Design,
Webmaster Tools
5
comments