css2 basic

CSS&코딩 2011. 11. 8. 22:06

ID: id selector is used to specify a style for a single, unique element.

Class: a style for a group of elements. Unlike the id selector, the class selector is most often used on several elements.

many HTML elements with the same class

ID
Class
single element  several elements
unique element  Many html elements with the same class/ group of elements
Specify  Specify

Do NOT start a class name with a number! This is only supported in Internet Explorer.
 

display:block; 그 어떤tag에도 block을 지정하면 table처럼 꾸미는게 가능하다

for cross-browser compatibility

list-style-type: none;
padding: 0px;
margin: 0px;


Total element width = width + left padding + right padding + left border + right border + left margin + right margin

Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin 

block: 한줄내려감

  • <h1>
  • <p>
  • <div>
     

inline: 한줄 안내려감

  • <span>
  • <a>
 

'CSS&코딩' 카테고리의 다른 글

css stylesheet 정리  (0) 2011.11.08
css3 설명서  (0) 2011.11.08
important  (0) 2011.11.08
Cool CSS3 navigation menu  (0) 2011.10.16
CSS로 동적인 효과  (0) 2011.10.11
posted by 알 수 없는 사용자