Posts

Showing posts from 2011

CSS Order and Background Property

Do not leave spaces between the property value and the units! "margin-left:20 px" (instead of "margin-left:20px") will work in IE, but not in Firefox or Opera. All the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority: Browser default External style sheet Internal style sheet (in the head section) Inline style (inside an HTML element) So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style defined inside the <head> tag, or in an external style sheet, or in a browser (a default value). If the link to the external style sheet is placed after the internal style sheet in HTML <head>, the external style sheet will override the internal style sheet! CSS BackGround CSS properties used for background effects: background-color-                 The background color property is used to set background

CSS - Float

The "float" parameter in CSS allows an element to be pushed to the left or right, allowing other elements to wrap around it. A floated element will move as far to the left or right as it can. Usually this means all the way to the left or right of the containing element. The elements after the floating element will flow around it. The elements before the floating element will not be affected      Eg: .img { float:right; } If you place several floating elements after each other, they will float next to each other if there is room. Turning the CSS Float Off - Clear attribute Elements after the floating element will flow around it. To avoid this, use the clear property. The clear property specifies which sides of an element other floating elements are not allowed.      Eg: .text_line { clear:both; } Reference :   W3c Help Clear Example in Stack Overflow

Javascript Functions

JavaScript Functions -- Inferences Functions are fundamental modular units. Functions are Objects Every object has object.protoype property which is used for inheritance. Functions also have a Prototype property that is internally connected to Object.prototype. Function .prototype is a constructor property whose value is the function itself.  Since they are objects they can be passed as objects. When a function is invoked with .(Dot) or [Subscript] then the function becomes a method.  The Function by default gets "arguments" as default argument even if it is not present in function signature however it is not exactly an array object but has "length" property. This Keyword If a function is defined within an Object and when function is invoked with that object."This" is tied to object.  Any Object is used to invoke function accessing "This" will retrive that objectinside function scope. When we use Nested Functions "This&quo