Tuesday, 8 December 2015

CSS positioning: Static, Absolute, Relative and Fixed

Static If you don't specify an element's positioning type, it defaults to static. This just means "where the element would normally go." If you don't tell an element how to position itself, it just plunks itself down in the document.

Absolute If the parent not go static, then the absolute position div is according to left.
The first type of positioning is absolute positioning. When an element is set to position: absolute, it's then positioned in relation to the first parent element it has that doesn't have position: static. If there's no such element, the element with position: absolute gets positioned relative to <html>.

To show you how this works, we've set the #outer div to have absolute positioning. This means that when you position the #inner div, it will be relative to #outer. (If #outer had the default positioning of static, then #inner would get positioned relative to the entire HTML document.)

Relative positioning is more straightforward: it tells the element to move relative to where it would have landed if it just had the default static positioning.

Finally, fixed positioning anchors an element to the browser window—you can think of it as gluing the element to the screen. If you scroll up and down, the fixed element stays put even as other elements scroll past.

Static positioning tergantung normally flow.
Absolute positioning tergantung parent.
Relative tergantung static positioning.
Fixed positioning tergantung posisi awal, scroll ke bawah tetap sama.

Seneng banget kalau menuruti perintah kita.

Monday, 7 December 2015

1. Selectors
2. Classes/IDs
3. Margins
4. Paddings
5. Border
6. Position

1. Create 4 divs. One for the header, one for the left column, one for the right column, and one for the footer. So, create 4 divs:
Answer:
<body>
<div id="header"></div>
     <div class="left"></div>
     <div class="right"></div>
     <div id="footer"></div>
</div>
</body>


2. Create border-radius each of div
Answer:
div {
border-radius: 5px;
}

3. Give your divs a height, weight and background-color. Add dimension and color to our divs.
header
{
weight:  ;
height: ;

}


Saturday, 5 December 2015

By default

Margin-top is:
Margin-bottom is:
Padding-top is:
Padding-bottom is:
width:
height:

Natrium can live harmony with Clorine.
Targetting
Styling
Positioning

Hard to remember Word and Number?

Word?
Try this for instances Nemesis
Backward it: sisemeN

Try this for instances Nefarious
Backward it: souirafeN


Number?
Two digit number:
29
Try to convert it to word, for i.e: 29 is RG or ZG

Three digit number:
781
Try to covert it to word, for i.e: 781 is TBI

Friday, 4 December 2015

Linux/Unix Command Line

Go/navigate filesystem

1. Print all working directory
$ pwd
/home/ccuser/workspace

2. Lists all files & folder in the current working directory
$ ls
2014  2015  hardware.txt   
By default ls list all files & folder in the current working directory alphabetically.

3. Switches into any directory that you specify, in this case directory "2015".
$ cd 2015

4. Move up one directory from current working dir
$ cd ..

5. Create one directory, in the current working dir, in this case directory "media"
$ mkdir media                 

6. Create "empty" file in current working directory
$ touch keyboard.txt

Copy, moves and delete files

1. Listing files that hidden
$ ls -a

2. Listing files & folder in tables / long format.
$ ls -l

3. Listing files $ folders in time manner
$ ls -t

4. Copying a file or files
$ cp * superman/

$ cp superman



5. Delete a file
$ rm waterboy.txt

delete a folder (recursive)
$ rm -r slapstick

Redirection

Redirect an input

Redirect an output
$ echo "Hello"

Redirect an output to text file (>)
$ echo "Hello" > hello.txt
and then:
$ cat hello.txt

example(2):
$ cat oceans.txt > continents.txt
Warning: > will overwrite all original content inside continents.txt

example(3) append:
$ cat glaciers.txt >> rivers.txt
>> will take the standard output of the command on the left and appends (adds) it to the file on the right.

Here, the the output data of rivers.txt will contain the original contents of rivers.txt with the content of glaciers.txt appended to it.

example(4)
$