eire web design home page contact eire-web design eire web design and development site map
stepping on in business
October 15th, 2007
Excerpt: In CSS is very easy to overwrite a rule you have created earlier, then you wonder why making changes to the rule doesn't  apply to the page layout.  One thing to know is the !important rule available since CSS1. Adding !important after a command like this: .div { margin-left: 5px;color:#ff0000!important;margin-left: 3px;} will make sure that all browsers  will have a margin-left of 5px regardless of what appears after it, except IE (Internet Explorer)  which ignores the !important command gives a margin-left of 3px. This can be very useful when you need to set relative margin as the display will differ from browser to browser. IE, however, will respect the !important declarations if they are not in the same rule as below: .div_font {color: red;!important;} .div_font { color: blue; } So whatever you asign this rule to the font color will be red not blue as in the second command.  The first example above was a very useful CSS Hack for IE, however since IE7 has been released, the !important rule doesn't have much effect any longer, as IE7 renders the page much like Firefox.
... read more » ...
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted in CSS | No Comments »

October 15th, 2007
Excerpt: Do you ever wonder how you can center a containing div? The use of "tables" or "center" tag makes the job a lot easier, but it will fail validation. Another way of doing this is using CSS stylesheet. body{padding:0px; margin:0px; text-align:center;} #div_container{margin-left: auto;margin-right: auto;width:800px;} The only problem with the above solution is that "#div_container" will also have the text centered. To overcome this problem you have to specify the "text-align" tag as below: body{padding:0px; margin:0px; text-align:center;} #div_container{margin-left: auto;margin-right: auto;width:800px;text-align:left;} W3C Visual formatting model explains: "If both 'margin-left' and 'margin-right' are 'auto', their used values are equal. This horizontally centers the element with respect to the edges of the containing block."
... read more » ...
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted in CSS | 2 Comments »

October 15th, 2007
Excerpt: These is a simple Ajax example that will load content into the page from another file without browser refresh. 05-Oct-2007 - We have updated the javascript to allow the use of forms to be submited using POST. Click here for Demo » OR DOWNLOAD THE AJAX SAMPLE How does it work? First we need to create the javascript file with the following code: var ewd_domain = 'http://www.eire-webdesign.ie/'; //set domain var ewd_loading_img = ewd_domain + 'images/loading.gif';//set image path var ewd_loading_msg = 'Loading Data...';//set loading message var xmlhttp_obj = false; //create the XMLHttpRequest function ewd_xmlhttp(){ if (window.XMLHttpRequest){ // if Mozilla, Safari etc xmlhttp_obj = new XMLHttpRequest(); }else if (window.ActiveXObject){ // if IE try{ xmlhttp_obj = new ActiveXObject("Msxml2.XMLHTTP"); }catch (e){ try{ xmlhttp_obj = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e){ } } }else{ xmlhttp_obj = false; } return xmlhttp_obj; } //get content via GET function ewd_getcontent(url, containerid){ var xmlhttp_obj = ewd_xmlhttp(); document.getElementById(containerid).innerHTML = '' + ewd_loading_msg; xmlhttp_obj.onreadystatechange=function(){ ewd_loadpage(xmlhttp_obj, '', containerid); } xmlhttp_obj.open('GET', url, true); xmlhttp_obj.send(null); } function ewd_loadpage(xmlhttp_obj, content, containerid){ if ( xmlhttp_obj.readyState == 4 && xmlhttp_obj.status == 200 ){ document.getElementById(
... read more » ...
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4.00 out of 5)
Loading ... Loading ...
Tags:
Posted in Ajax | 17 Comments »

October 14th, 2007
Excerpt: Quote from Wikipedia:  "Ajax, shorthand for Asynchronous JavaScript and XML, is a web development technique for creating interactive web applications.   The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user makes a change.   This is meant to increase the web page's interactivity, speed, and usability. " ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: A while back I was wondering how can I make use of this technology and still have the website accessible by visitors that doesn't have JavaScript enabled browser and can not make use of the XMLHttpRequest and also have the search engine spidering the website without any problems. The solution I came up with was to create an instance of the XMLHttpRequest and store a cookie on the user computer with the value received. If the instance is successfully created we store a cookie "xml_state" with the value "yes" for 1 day (24 hours), if not then a cookie "xml_state" with the value "no" will be set instead. Then using the request cookie method we can handle how we are writing the "a href" tags. I have this done using PHP, by creating another function to handle the way the links will be written. Let's dig in step by step. // first create the XMLHTTP function // Create XMLHTTP - Note: AJAX feature requires IE5.5+, FF1+, and NS6.2+ functi
... read more » ...
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Tags: ,
Posted in Ajax | 2 Comments »

Links...

Chicklets...
  • http://www.eire-webdesign.ie/blog/feed/
    http://www.eire-webdesign.ie/blog/feed/
    Google Reader or Homepage
    Add to My Yahoo!
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    add to msn
    Add to My AOL
    Add to Technorati Favorites!
    pageflakes
    windows live