Peter Moore

Peter Moore

(2 comments, 39 posts)

This user hasn't shared any profile information

Home page: http://www.pmlmedia.co.uk

Posts by Peter Moore

Multiple instances of CurvyCorners on your web page

0

To have multiple instances of CurvyCorners on a page you need to add all the DIVs that require curvy corners as Variables in the JavaScript in the Head of your document.

To add nice curvy corners to your layout, simply upload the curvycorners javascript to your site’s scriptfolder.
Then call the script library in the head of your document like this…

<script type=”text/JavaScript” src=”./scripts/curvycorners.js”></script>

…then run the script in your page by adding this script to the head of your document…Notice that “lsidebar” and “mainwrap” etc are the IDs of the DIVs that you want curvy.


<script type=”text/JavaScript”>
window.onload = function() {
var settings = {
tl: { radius: 8 },
tr: { radius: 8 },
bl: { radius: 8 },
br: { radius: 8 },
antiAlias: true
}
var divObj1 = document.getElementById(“lsidebar”);
var divObj2 = document.getElementById(“mainwrap”);

curvyCorners(settings, divObj1, divObj2);
}
</script>

To add curves to other DIVs you need to just add another variable…e.g…

var divObj3 = document.getElementById(“div-id-here”); 

…and add the name of the variable into the settings…e.g…

curvyCorners(settings, divObj1, divObj2, divObj3);

directions

Use Mod Rewrite to append www to URLs

0


This is how to add www to the start of all your URLs in your website.
Simply edit your .htaccess file…


# Redirect adding leading www to root domain if not subdomain specified
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

You can also add a trailing slash to URL’s to increase performance. When a trailing slash is added to the end of a URL that does not end in a file extension, it tells the server to look only for that directory name.

rewriteCond $1 !/$
rewriteCond %{REQUEST_FILENAME}/ -d
rewriteRule (.+) http://www.domain.com/$1/ [R=301,L]

tabs

JQuery-Tools: Tabs – problems using the apple-overlay effect inside a pane

2


Had beginners problems using the JQuery-Tools tabs tool because every time I tried to put divs inside the tabs panes, (divs containing anything other than text), I found the content of the panes would not display in the tab. After trying to reference a separate file and an iframe I found the apple-overlay effect worked but wasn’t displaying in the centre of the screen. I found this answer after trying: nested tabs, adding a wrapper class to the pane divs. Both these solutions didn’t work then I found to use the apple-overlay inside a tab, I needed to use the ajax-tabs set up rather than the basic set-up for tabs and this fix in my css to sort the display issue ….think it’s called a child selector….

Rather than…

div.panes div { display:none; etc… } for the pane styling, use

div.panes > div { display:none; etc… }

and the display:none issue with divs inside tabs panes will only apply to the first div in a pane.

Spoon Apps Library : run IE7 in Windows 7 in the browser

0

Spoon run all the browsers in 1 browser
I recently had problems with internet explorer not displaying images correctly and had to cross-browser test and correct a website that was playing up in IE7. Having recently installed Windows 7 on all my machines (and being an advocate of Chrome) I found that IE7 was not readily available for Windows 7. I found this site spoon.net that lets you run a browser sandbox for hundreds of apps including Internet Explorer 7 and have used it to mess about with all the old browsers. I’ve also found it handy for discovering new apps as well. Defiantly deserves a place on the bookmark bar… next to differencebetween.net

helvetireader

Helvetireader – A minimal, anti-social theme for Google Reader

0

I can’t get my head round Google Reader but Helvetireader certainly helps. This stylesheet can be installed as a chrome extension or a Firefox add-in and gets rid of all the junk and just serves you the headlines in a nice, legible skin.  Made by Hicksdesign by the way…

Peter Moore's RSS Feed
Go to Top