Archive for February, 2010


Javascript Style Reference

Tags: , , , ,

I’m always forgetting what the JavaScript equivalent is of certain CSS styles.  for instance you could change the border by:

document.getElementById(‘myText’).style.border = ‘1px solid #333’;

CSS PropertyJavaScript Reference
backgroundbackground
background-attachmentbackgroundAttachment
background-colorbackgroundColor
background-imagebackgroundImage
background-positionbackgroundPosition
background-repeatbackgroundRepeat
borderborder
border-bottomborderBottom
border-bottom-colorborderBottomColor
border-bottom-styleborderBottomStyle
border-bottom-widthborderBottomWidth
border-colorborderColor
border-leftborderLeft
border-left-colorborderLeftColor
border-left-styleborderLeftStyle
border-left-widthborderLeftWidth
border-rightborderRight
border-right-colorborderRightColor
border-right-styleborderRightStyle
border-right-widthborderRightWidth
border-styleborderStyle
border-topborderTop
border-top-colorborderTopColor
border-top-styleborderTopStyle
border-top-width borderTopWidth
border-widthborderWidth
clearclear
clipclip
colorcolor
cursorcursor
displaydisplay
filterfilter
fontfont
font-familyfontFamily
font-sizefontSize
font-variantfontVariant
font-weightfontWeight
heightheight
leftleft
letter-spacingletterSpacing
line-heightlineHeight
list-stylelistStyle
list-style-imagelistStyleImage
list-style-positionlistStylePosition
list-style-typelistStyleType
marginmargin
margin-bottommarginBottom
margin-leftmarginLeft
margin-rightmarginRight
margin-topmarginTop
overflowoverflow
paddingpadding
padding-bottompaddingBottom
padding-leftpaddingLeft
padding-rightpaddingRight
padding-toppaddingTop
page-break-afterpageBreakAfter
page-break-beforepageBreakBefore
positionposition
floatstyleFloat
text-aligntextAlign
text-decorationtextDecoration
text-decoration: blinktextDecorationBlink
text-decoration: line-throughtextDecorationLineThrough
text-decoration: nonetextDecorationNone
text-decoration: overlinetextDecorationOverline
text-decoration: underlinetextDecorationUnderline
text-indenttextIndent
text-transformtextTransform
toptop
vertical-alignverticalAlign
visibilityvisibility
widthwidth
z-indexz-index
Javascript CSS Style reference

Shamelessly stolen from: http://codepunk.hardwar.org.uk/css2js.htm

Permalink » No comments

crunchyland items

Tags: , ,

I’ve submitted a few clothing designs for Crunchyland (since it’s fun!)  Most were accepted, but not all! D:  A lot of them are based on Kogenta from Onmyou Taisenki(sp?) The base is not my work – just the items!

Green Tiger Hair


Poofy purple pants


Tight White Shirt


Feet Wraps


Green Tiger Tail


Serpent Tail


Permalink » No comments

Alignment issues

Tags: , , , , ,

Ever have this problem where your centered elements will “wiggle” out of place when you adjust the size of your browser?  It’s just by one pixel, and annoys me to death.

I found this article about it: http://acko.net/blog/css-sub-pixel-background-misalignments

It seems like it’s a margin/padding issue.  I took the offending div element and added “margin-left: 1px;” to it’s class and it worked!  Beautifully 🙂  You may also need to nudge any background images by one pixel.

It does concern me that other elements on the page align perfectly, where it was only the #footer div that was giving me grief.

UPDATE

The aformentioned fix applies to 100% divs that have a centered background.  I came across this same problem in a div that was set to margin:auto;.  I went ahead and added “margin-left: 1px;” to the body and that fixed everything up nicely 🙂

Permalink » No comments

ApacheBench

Tags: , , , , ,

I was looking around today for some means to load test my scripts, I happened upon this website:  http://loadimpact.com/

It’s free services were alright, but up to 50 users just won’t put my scripts through they’re paces!  I’ve looked into trying something called ApacheBench before, but had trouble.  It’s something you can only access through SSH, and when in there I kept receiving “-bash: ab: command not found” errors.  Not fun!

The problem was I wasn’t in the right directory.  I found out you can search for ApacheBench but running “find / -name ab” (without quotes)  then you would include the directory when running ApacheBench “/dir/ab -n 100 http://yourdomain.com"

References:
http://sharebear.co.uk/blog/2009/03/12/optimising-django-dreamhost/
http://www.webmaster-talk.com/php-forum/116797-web-stress-tools-recommend.html
http://httpd.apache.org/docs/1.3/programs/ab.html
http://wiki.dreamhost.com/Ssh

Permalink » No comments

Stands for…

Tags: , , ,

I hate not knowing what things stand for!  Someone idly asks you “What does FTP stand for?”  And you sit there like a wide eyed idiot.  They’re abbreviations we abuse everyday so it looks bad when you really have no idea what you’re saying.

FTP: File Transfer Protocol

URL: Universal Resource Listing

HTML: Hyper Text Markup Language

CSS: Cascading Style Sheets

PHP: PHP Hypertext Preprocessor (the second PHP is said to stand for Personal Home Page)

CGI: Common Gateway Interface

LAMP: Linux, Apache, MySQL, PHP  (P may also stand for Perl or Python)

MySQL: My Structured Query Language

PERL: Practical Extraction and Report Language

Linux: Linus’ Unix

Unix: UNiplexed Information and Computing System.

CMS: Content Management System

CDN: Content Delivery System

RoR: Ruby on Rails

OOP: object-oriented programming

SVN: Subversion

JSON: JavaScript Object Notation

AJAX: Asynchronous, JavaScript, And XML

GD Library: Originally stood for “Gif Draw”  but is now considered “Graphics Draw”

CHMOD: Change Mode

QEP: Query Execution Plan

API: Application Program Interface

XML: Extensible Markup Language

XXS: Cross-Site Scripting

CSV: Comma Separated Values

cURL: Client URLs

MCE: Moxiecode Content Editor

CRUD: create, read, update, and delete

Permalink » No comments