Skip to main content

CSS Block and inline level elements

Nearly all HTML elements are either block or inline elements. The characteristics of block elements include:

  • begin on a new line
  • Height, line-height and top and bottom margins can be manipulated
  • defaults to 100% of their containing element, unless a width is specified

Examples of block elements include

,

,

,

,

Two classes together

Usually attributes are assigned just one class, but this doesn’t mean that that’s all you’re allowed. In reality, you can assign as many classes as you like! For example:
class=”text side”

Using these two classes together (separated by a space, not with a comma) means that the paragraph calls up the rules assigned to both text and side. If any rules overlap between the two classes then the class which is below the other in the CSS document will take precedence.

!important ignored by IE

Normally in CSS whichever rule is specified last takes precedence. However if you use !important after a command then this CSS command will take precedence regardless of what appears after it. This is true for all browsers except IE. An example of this would be:
margin-top: 3.5em !important; margin-top: 2em

So, the top margin will be set to 3.5em for all browsers except IE, which will have a top margin of 2em. This can sometimes come in useful, especially when using relative margins (such as in this example) as these can display slightly differently between IE and other browsers.

(Many of you may also be aware of the CSS child selector, the contents of which IE ignores.)

CSS border default value

When writing a border rule you’ll usually specify the colour, width and style (in any order). For example, border: 3px solid #000 will give you a black solid border, 3px thick. However the only required value here is the border style.

If you were to write just border: solid then the defaults for that border will be used. But what defaults? Well, the default width for a border is medium (equivalent to about 3 to 4px) and the default colour is that of the text colour within that border. If either of these are what you want for the border then you can leave them out of the CSS rule!

Universal selector

The universal selector, written “*”, matches the name of any element type. It matches any single element in the document tree.

If the universal selector is not the only component of a simple selector, the “*” may be omitted. For example:

* *[LANG=fr] and [LANG=fr] are equivalent.
* *.warning and .warning are equivalent.
* *#myid and #myid are equivalent.

Font Size Conversion Chart

Font Size Conversion Chart
Points Pixels Ems Percent Keyword Default sans-serif
6pt 8px 0.5em 50% CSS Tricks
7pt 9px 0.55em 55% CSS Tricks
7.5pt 10px 0.625em 62.5% x-small CSS Tricks
8pt 11px 0.7em 70% CSS Tricks
9pt 12px 0.75em 75% CSS Tricks
10pt 13px 0.8em 80% small CSS Tricks
10.5pt 14px 0.875em 87.5% CSS Tricks
11pt 15px 0.95em 95% CSS Tricks
12pt 16px 1em 100% medium CSS Tricks
13pt 17px 1.05em 105% CSS Tricks
13.5pt 18px 1.125em 112.5% large CSS Tricks
14pt 19px 1.2em 120% CSS Tricks
14.5pt 20px 1.25em 125% CSS Tricks
15pt 21px 1.3em 130% CSS Tricks
16pt 22px 1.4em 140% CSS Tricks
17pt 23px 1.45em 145% CSS Tricks
18pt 24px 1.5em 150% x-large CSS Tricks
20pt 26px 1.6em 160% CSS Tricks
22pt 29px 1.8em 180% CSS Tricks
24pt 32px 2em 200% xx-large CSS Tricks
26pt 35px 2.2em 220% CSS Tricks
27pt 36px 2.25em 225% CSS Tricks
28pt 37px 2.3em 230% CSS Tricks
29pt 38px 2.35em 235% CSS Tricks
30pt 40px 2.45em 245% CSS Tricks
32pt 42px 2.55em 255% CSS Tricks
34pt 45px 2.75em 275% CSS Tricks
36pt 48px 3em 300% CSS Tricks

There is a good online PX to EM conversion calculator available. You can also use this calculator.

Windows Short Cuts

Key Board Short Cuts

  • CTRL+C (Copy)
  • CTRL+X (Cut) …
  • CTRL+V (Paste)
  • CTRL+Z (Undo)
  • DELETE (Delete)
  • SHIFT+DELETE (Delete the selected item permanently without placing the item in the Recycle Bin)
  • CTRL while dragging an item (Copy the selected item)
  • CTRL+SHIFT while dragging an item (Create a shortcut to the selected item)
  • F2 key (Rename the selected item)
  • CTRL+RIGHT ARROW (Move the insertion point to the beginning of the next word)
  • CTRL+LEFT ARROW (Move the insertion point to the beginning of the previous word)
  • CTRL+DOWN ARROW (Move the insertion point to the beginning of the next paragraph)
  • CTRL+UP ARROW (Move the insertion point to the beginning of the previous paragraph)
  • CTRL+SHIFT with any of the arrow keys (Highlight a block of text) SHIFT with any of the arrow keys (Select more than one item in a window or on the desktop, or select text in a document)
  • CTRL+A (Select all)
  • F3 key (Search for a file or a folder)
  • ALT+ENTER (View the properties for the selected item)
  • ALT+F4 (Close the active item, or quit the active program)
  • ALT+ENTER (Display the properties of the selected object)
  • ALT+SPACEBAR (Open the shortcut menu for the active window)
  • CTRL+F4 (Close the active document in programs that enable you to have multiple documents opensimultaneou sly)
  • ALT+TAB (Switch between the open items)
  • ALT+ESC (Cycle through items in the order that they had been opened)
  • F6 key (Cycle through the screen elements in a window or on the desktop)
  • F4 key (Display the Address bar list in My Computer or Windows Explorer)
  • SHIFT+F10 (Display the shortcut menu for the selected item)
  • ALT+SPACEBAR (Display the System menu for the active window)
  • CTRL+ESC (Display the Start menu)
  • ALT+Underlined letter in a menu name (Display the corresponding menu) Underlined letter in a command name on an open menu (Perform the corresponding command)
  • F10 key (Activate the menu bar in the active program)
  • RIGHT ARROW (Open the next menu to the right, or open a submenu)
  • LEFT ARROW (Open the next menu to the left, or close a submenu)
  • F5 key (Update the active window)
  • BACKSPACE (View the folder onelevel up in My Computer or Windows Explorer)
  • ESC (Cancel the current task)
  • SHIFT when you insert a CD- ROMinto the CD-ROM drive (Prevent the CD-ROM from automatically playing)

Dialog Box – Keyboard Shortcuts

  • CTRL+TAB (Move forward through the tabs)
  • CTRL+SHIFT+TAB (Move backward through the tabs)
  • TAB (Move forward through the options)
  • SHIFT+TAB (Move backward through the options)
  • ALT+Underlined letter (Perform the corresponding command or select the corresponding option)
  • ENTER (Perform the command for the active option or button)
  • SPACEBAR (Select or clear the check box if the active option is a check box)
  • Arrow keys (Select a button if the active option is a group of option buttons)
  • F1 key (Display Help)
  • F4 key (Display the items in the active list)
  • BACKSPACE (Open a folder one level up if a folder is selected in the Save As or Open dialog box)

Microsoft Natural Keyboard Shortcuts

  • Windows Logo (Display or hide the Start menu)
  • Windows Logo+BREAK (Display the System Properties dialog box)
  • Windows Logo+D (Display the desktop)
  • Windows Logo+M (Minimize all of the windows)
  • Windows Logo+SHIFT+M (Restorethe minimized windows)
  • Windows Logo+E (Open My Computer)
  • Windows Logo+F (Search for a file or a folder)
  • CTRL+Windows Logo+F (Search for computers)
  • Windows Logo+F1 (Display Windows Help)
  • Windows Logo+ L (Lock the keyboard)
  • Windows Logo+R (Open the Run dialog box)
  • Windows Logo+U (Open Utility Manager)
  • Accessibility Keyboard Shortcuts
  • Right SHIFT for eight seconds (Switch FilterKeys either on or off)
  • Left ALT+left SHIFT+PRINT SCREEN (Switch High Contrast either on or off)
  • Left ALT+left SHIFT+NUM LOCK (Switch the MouseKeys either on or off)
  • SHIFT five times (Switch the StickyKeys either on or off)
  • NUM LOCK for five seconds (Switch the ToggleKeys either on or off)
  • Windows Logo +U (Open Utility Manager)
  • Windows Explorer Keyboard Shortcuts
  • END (Display the bottom of the active window)
  • HOME (Display the top of the active window)
  • NUM LOCK+Asterisk sign (*) (Display all of the subfolders that are under the selected folder)
  • NUM LOCK+Plus sign (+) (Display the contents of the selected folder)
  • NUM LOCK+Minus sign (-) (Collapse the selected folder)
  • LEFT ARROW (Collapse the current selection if it is expanded, or select the parent folder)
  • RIGHT ARROW (Display the current selection if it is collapsed, or select the first subfolder)

Shortcut Keys for Character Map
After you double-click a character on the grid of characters, you can move through the grid by using the keyboard shortcuts:

  • RIGHT ARROW (Move to the rightor to the beginning of the next line)
  • LEFT ARROW (Move to the left orto the end of the previous line)
  • UP ARROW (Move up one row)
  • DOWN ARROW (Move down one row)
  • PAGE UP (Move up one screen at a time)
  • PAGE DOWN (Move down one screen at a time)
  • HOME (Move to the beginning of the line)
  • END (Move to the end of the line)
  • CTRL+HOME (Move to the first character)
  • CTRL+END (Move to the last character)
  • SPACEBAR (Switch between Enlarged and Normal mode when a character is selected) Microsoft Management Console

(MMC) Main Window Keyboard Shortcuts

    1

  • CTRL+O (Open a saved console)
  • CTRL+N (Open a new console)
  • CTRL+S (Save the open console)
  • CTRL+M (Add or remove a console item)
  • CTRL+W (Open a new window)
  • F5 key (Update the content of all console windows)
  • ALT+SPACEBAR (Display the MMC window menu)
  • ALT+F4 (Close the console)
  • ALT+A (Display the Action menu)
  • ALT+V (Display the View menu)
  • ALT+F (Display the File menu)
  • ALT+O (Display the Favorites menu)

MMC Console Window Keyboard Shortcuts

  • CTRL+P (Print the current page or active pane)
  • ALT+Minus sign (-) (Display the window menu for the active console window)
  • SHIFT+F10 (Display the Action shortcut menu for the selected item)
  • F1 key (Open the Help topic, if any, for the selected item)
  • F5 key (Update the content of all console windows)
  • CTRL+F10 (Maximize the active console window)
  • CTRL+F5 (Restore the active console window)
  • ALT+ENTER (Display the Properties dialog box, if any, for theselected item)
  • F2 key (Rename the selected item)
  • CTRL+F4 (Close the active console window. When a console has only one console window, this shortcut closes the console)

Remote Desktop Connection Navigation

  • CTRL+ALT+END (Open the Microsoft Windows NT Security dialog box)
  • ALT+PAGE UP (Switch between programs from left to right)
  • ALT+PAGE DOWN (Switch between programs from right to left)
  • ALT+INSERT (Cycle through the programs in most recently used order)
  • ALT+HOME (Display the Start menu)
  • CTRL+ALT+BREAK (Switch the client computer between a window and a full screen)
  • ALT+DELETE (Display the Windows menu)
  • CTRL+ALT+Minus sign (-) (Place a snapshot of the active window in the client on the Terminal server clipboard and provide the same functionality as pressing PRINT SCREEN on a local computer.)
  • CTRL+ALT+Plus sign (+) (Place asnapshot of the entire client window area on the Terminal server clipboardand provide the same functionality spressing ALT+PRINT SCREEN on a local computer.)

Microsoft Internet Explorer Keyboard Shortcuts

  • CTRL+B (Open the Organize Favorites dialog box)
  • CTRL+E (Open the Search bar)
  • CTRL+F (Start the Find utility)
  • CTRL+H (Open the History bar)
  • CTRL+I (Open the Favorites bar)
  • CTRL+L (Open the Open dialog box)
  • CTRL+N (Start another instance of the browser with the same Web address)
  • CTRL+O (Open the Open dialog box,the same as CTRL+L)
  • CTRL+P (Open the Print dialog box)
  • CTRL+R (Update the current Web page)
  • CTRL+W (Close the current window)

Grouping

When several selectors share the same declarations, they may be grouped into a comma-separated list.

Example(s):

In this example, we condense three rules with identical declarations into one. Thus,

H1 { font-family: sans-serif }
H2 { font-family: sans-serif }
H3 { font-family: sans-serif }

is equivalent to:

H1, H2, H3 { font-family: sans-serif }

CSS offers other “shorthand” mechanisms as well, including multiple declarations and shorthand properties.

Boxtest

Boxtest

Here is a sample div with class “boxtest”.

It has 20px border, 30px padding, and 300px width.

div.boxtest {
border:20px solid;
padding:30px;
background: #ffc;
width:300px;
}

The total width including borders and padding should be 400px.

20+30+300+30+20 = 400

User agents which misinterpret the CSS1 box model by placing border and padding inside the specified width would result in a total width of only 300px, and a content width of only 200px.

300-20-30-30-20 = 200

The red and blue bars below are there for comparison. This div (including its borders) should be as wide as the blue bar.

ആസുരമായ ജീവിതയാത്രയിൽ പലനേരങ്ങളിൽ കടന്നെത്തിയ ചിന്തകൾ, പ്രതീക്ഷകൾ, സ്വപ്നങ്ങൾ, പ്രണയങ്ങൾ, കുഞ്ഞറിവുകൾ, തിരിച്ചറിവുകൾ ഒക്കെയും ചേർത്തുവെച്ചൊരിടമാണിത്. ശ്ലഥചിത്രങ്ങൾ തുന്നിച്ചേർത്തൊരിടം - ചായില്യം!

Chayilyam

Rajesh K,
Chayilyam, Eriya Post, Anandhasram Via, Kasaragod Dist., PIN: 671531, Kerala.

© 2024 ചായില്യം. All rights reserved.

×

Hello!

താഴെ കാണുന്ന വാട്സാപ്പ് ഐക്കൺ ക്ലിക്ക് ചെയ്യുകയോ ഈ മെയിൽ ഐഡിയിലേക്ക് മെയിൽ അയക്കുകയോ ചെയ്യുക.

രാജേഷ് ഒടയഞ്ചാൽ

×
Verified by MonsterInsights