SlideShare a Scribd company logo
1 of 15
Download to read offline
[ABYDOS] 웹 표준

(4강) 실전예제-네비게이션,버튼,박스




      2011년 02월 15일
1. 네비게이션


            2. 버튼스타일


            3. 박스모델링

목차(INDEX)
            4. 중앙정열 팁


            4. 포지셔닝


            4. 플로팅
실전예제1-네비게이션

• http://www.highdots.com/products/css-tab-designer/
                                                                http://naradesign.net/open_c
                                                                ontent/reference/navigation.
                                                                html




ABYDOS                  Copyright abydos All rights Reserved.
실전예제2-버튼 스타일

                                                                    http://petitmuto.net/study_css/CS
• http://naradesign.net/wp/2008/10/31/203/                          STextButton01/CSS%20Text%20B
                                                                    utton%20Design%20With%20Icon.
                                                                    htm




                                                                http://www.iwebtoolsonline.com/html-
                                                                and-css-rounded-corner-button-
                                                                generator




ABYDOS                  Copyright abydos All rights Reserved.
박스모델링

• Css에서는 각각요소에 생성된 사각형
  영역을 ‘박스’라고 표현

• 박스의 구성
  Content+padding+border+margin
•   화면에서 보이는 부분 :content+padding+border
•   화면에서 보이지 않는 부분 : Margin


    표시방법(display 속성)
    배치방법과 위치(position, top, right, bottom, left 속성)
    플로트(float, clear 속성)
    겹쳐지는 순서(z-inddex 속성)
    텍스트의 표기 방향(direction 속성, Unicode-bidi 속성)
    폭과 높기(width 속성, height 속성)
    인라인박스의 높이(line-height 속성)
    인라인박스나 칸의 수직위치(vertical-align 속성)



Width값의 범위
• 잘못된 width값(x) : content+padding+border =>화면보다 커짐
• 올바른 width값(o) : padding,border를 제외한 순수한 content영역

ABYDOS                                 Copyright abydos All rights Reserved.
박스모델링 – 중앙정열 Tip


Margin=‚0 auto;‛
• <table> 중앙정열 align="center‚
• css 레이아웃 margin=‚0 auto;"

Vertical-align
• <table> 엘리먼트를 이용할 때는 valign 혹은 height="100%"와 같은 속성을 이
  용 세로정렬이 자유롭지맊 css에서는 쉽지 않다.

• vertical-align 특성
사용할 수 있는 범위는 td 와 inline 속성에서 적용 가능<td>,<img>,<input>




                               중앙정렬을 위해
                               img, input, select {vertical-align: middle;}를 추가해준다.



ABYDOS               Copyright abydos All rights Reserved.
중앙정열 Tip-position 속성과 negative margin


<style type="text/css">
                           1. position: absolute; 브라우저를 중심으로
#middle {                    offset 지정 가능
position: absolute;
top: 50%;
                           2. top 50%; left: 50%;
left: 50%;

width: 140px;              3. 블럭크기의 절반맊큼 음수마짂을 주게 되면
height: 140px;                엘리먼트의 정중앙이 화면의 정중앙과 일치
margin: -70px 0 0 -70px;
}
</style>




ABYDOS                     Copyright abydos All rights Reserved.
Tip-100%높이 유지하는 레이아웃


       div {height: 100%:}가 적용되지 않는 이유

     div 속성에서 height: 100%;를 주었음에도 랜더링시 적용되지 않는 이유는
    height 값의 기본은 상위 엘리먼트 이기 때문 따라서

    body의 height: 100%;로 지정되어 있지 않을 경우 하위 div {height:
    100%;}는 랜더링 불가

    마찬가지로 html역시 height: 100%;로 지정되어 있어야 한다.
    html > body > div 순서로 height: 100%로 지정

 <style type="text/css">
 html,
 body {
 height: 100%;
 margin: 0;
 padding: 0;
 }
 #head {
 height: 100px;
 background: #ddd;
 position: relative;
 z-index: 1;
 }
ABYDOS                         Copyright abydos All rights Reserved.
 #body {
LAYOUT -포지셔닝(position)

• Position의 속성

Absolute (절대적 위치)
브라우저를 기준으로 위치 속성을 사용 하며 parent 요소에 의해 하위 위치에 있다면 그 곳을 기준으로 합니다.

top, left, right, bottom을 통해서 좌표를 잡는데   실제 브라우저를 기준으로 위치하게 됩니다.



 relative (상대적 위치)
 객체가 위치 속성에 의해 설정 되거나 태그내에 위치시                마지막 위치를 기준으로 상대값을 정해 줍니다.
 즉, 포지션을 정하지 않은 상태에서 보면 그곳에 위치가 브라우저에 나올것입니다.

 바로 그곳을 기준으로 포지션에 relative를 사용해서 top, left, right, bottom을 이용해서 위치를 정할수 있습니다


 Fixed (고정 위치) –브라우저창에 고정
 static (기본 위치) –기본값



ABYDOS                            Copyright abydos All rights Reserved.
LAYOUT –포지셔닝(position)

• Position의 속성




 • absolute                                       • relative




     예제를 보세요



ABYDOS               Copyright abydos All rights Reserved.
LAYOUT – 플로팅(float)

• float:left – 박스이동, 정렬 (float 속성)

•속성 : float
•값 : left, right, none, inherit
•기본값 : none
•적용대상 : position 속성의 값이 'static' 인 요소(content 속성으로 생성된 내용
제외)


속성 값에 대한 의미

float: left : 그 요소를 왼쪽으로 float된 블록 박스로 맊든다.
float: right : 그 요소를 오른쪽으로 float된 블록 박스로 맊든다.
float: none : 그 요소를 float 하지 않는다.


float 속성을 적용하는 요소는 어떠한 형태로든 폭을 지정해야 하는 규칙이 있다.

float는 뒤에 오는 엘리먼트에도 영향-float가 헤제되지 않는다.
(clear 속성으로 해제 가능)
ABYDOS                 Copyright abydos All rights Reserved.
LAYOUT – 플로팅 해제 (clear)

• Clear:both; – 박스이동, 정렬해제 (clear 속성)

•속성 : clear
•값 : left, right, none, both, inherit
•기본값 : none
•적용대상 : 블록 레벨 요소


속성 값에 대한 의미는 다음과 같다.

•   clear:   none - float 유효, float는 해제되지 않는다.
•   clear:   left - 왼쪽 float 해제
•   clear:   right - 오른쪽 float 해제
•   clear:   both - 좌우 양측 float 해제

clear 속성은 float 된 박스 뒤에 이어지는 박스가 인접하지 않게 배치하는 속성이
다.

                                            Float를 clear하는 4가지 방법.
       예제를 보세요                              http://naradesign.net/wp/2008/05/27/144/

ABYDOS                        Copyright abydos All rights Reserved.
LAYOUT - 레이아웃


• 다음시갂에 이어서…^-^




ABYDOS        Copyright abydos All rights Reserved.
감사합니다.
ABYDOS
과제


 1. Css 네비게이션을 활용하여 현재 짂행중인 프로젝트
    ‘용식이v1.0’의 네비게이션 메뉴를 맊든다.


 2. Css 버튺이미지를 활용하여 현재짂행중인 프로젝트
    ‘용식이v1.0’의 버튺 라이브러리를 맊든다.




ABYDOS          Copyright abydos All rights Reserved.

More Related Content

Featured

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

2011웹표준[04] 실전예제(네비게이션,버튼,박스,포지션)

  • 1. [ABYDOS] 웹 표준 (4강) 실전예제-네비게이션,버튼,박스 2011년 02월 15일
  • 2. 1. 네비게이션 2. 버튼스타일 3. 박스모델링 목차(INDEX) 4. 중앙정열 팁 4. 포지셔닝 4. 플로팅
  • 3. 실전예제1-네비게이션 • http://www.highdots.com/products/css-tab-designer/ http://naradesign.net/open_c ontent/reference/navigation. html ABYDOS Copyright abydos All rights Reserved.
  • 4. 실전예제2-버튼 스타일 http://petitmuto.net/study_css/CS • http://naradesign.net/wp/2008/10/31/203/ STextButton01/CSS%20Text%20B utton%20Design%20With%20Icon. htm http://www.iwebtoolsonline.com/html- and-css-rounded-corner-button- generator ABYDOS Copyright abydos All rights Reserved.
  • 5. 박스모델링 • Css에서는 각각요소에 생성된 사각형 영역을 ‘박스’라고 표현 • 박스의 구성 Content+padding+border+margin • 화면에서 보이는 부분 :content+padding+border • 화면에서 보이지 않는 부분 : Margin 표시방법(display 속성) 배치방법과 위치(position, top, right, bottom, left 속성) 플로트(float, clear 속성) 겹쳐지는 순서(z-inddex 속성) 텍스트의 표기 방향(direction 속성, Unicode-bidi 속성) 폭과 높기(width 속성, height 속성) 인라인박스의 높이(line-height 속성) 인라인박스나 칸의 수직위치(vertical-align 속성) Width값의 범위 • 잘못된 width값(x) : content+padding+border =>화면보다 커짐 • 올바른 width값(o) : padding,border를 제외한 순수한 content영역 ABYDOS Copyright abydos All rights Reserved.
  • 6. 박스모델링 – 중앙정열 Tip Margin=‚0 auto;‛ • <table> 중앙정열 align="center‚ • css 레이아웃 margin=‚0 auto;" Vertical-align • <table> 엘리먼트를 이용할 때는 valign 혹은 height="100%"와 같은 속성을 이 용 세로정렬이 자유롭지맊 css에서는 쉽지 않다. • vertical-align 특성 사용할 수 있는 범위는 td 와 inline 속성에서 적용 가능<td>,<img>,<input> 중앙정렬을 위해 img, input, select {vertical-align: middle;}를 추가해준다. ABYDOS Copyright abydos All rights Reserved.
  • 7. 중앙정열 Tip-position 속성과 negative margin <style type="text/css"> 1. position: absolute; 브라우저를 중심으로 #middle { offset 지정 가능 position: absolute; top: 50%; 2. top 50%; left: 50%; left: 50%; width: 140px; 3. 블럭크기의 절반맊큼 음수마짂을 주게 되면 height: 140px; 엘리먼트의 정중앙이 화면의 정중앙과 일치 margin: -70px 0 0 -70px; } </style> ABYDOS Copyright abydos All rights Reserved.
  • 8. Tip-100%높이 유지하는 레이아웃 div {height: 100%:}가 적용되지 않는 이유 div 속성에서 height: 100%;를 주었음에도 랜더링시 적용되지 않는 이유는 height 값의 기본은 상위 엘리먼트 이기 때문 따라서 body의 height: 100%;로 지정되어 있지 않을 경우 하위 div {height: 100%;}는 랜더링 불가 마찬가지로 html역시 height: 100%;로 지정되어 있어야 한다. html > body > div 순서로 height: 100%로 지정 <style type="text/css"> html, body { height: 100%; margin: 0; padding: 0; } #head { height: 100px; background: #ddd; position: relative; z-index: 1; } ABYDOS Copyright abydos All rights Reserved. #body {
  • 9. LAYOUT -포지셔닝(position) • Position의 속성 Absolute (절대적 위치) 브라우저를 기준으로 위치 속성을 사용 하며 parent 요소에 의해 하위 위치에 있다면 그 곳을 기준으로 합니다. top, left, right, bottom을 통해서 좌표를 잡는데 실제 브라우저를 기준으로 위치하게 됩니다. relative (상대적 위치) 객체가 위치 속성에 의해 설정 되거나 태그내에 위치시 마지막 위치를 기준으로 상대값을 정해 줍니다. 즉, 포지션을 정하지 않은 상태에서 보면 그곳에 위치가 브라우저에 나올것입니다. 바로 그곳을 기준으로 포지션에 relative를 사용해서 top, left, right, bottom을 이용해서 위치를 정할수 있습니다 Fixed (고정 위치) –브라우저창에 고정 static (기본 위치) –기본값 ABYDOS Copyright abydos All rights Reserved.
  • 10. LAYOUT –포지셔닝(position) • Position의 속성 • absolute • relative 예제를 보세요 ABYDOS Copyright abydos All rights Reserved.
  • 11. LAYOUT – 플로팅(float) • float:left – 박스이동, 정렬 (float 속성) •속성 : float •값 : left, right, none, inherit •기본값 : none •적용대상 : position 속성의 값이 'static' 인 요소(content 속성으로 생성된 내용 제외) 속성 값에 대한 의미 float: left : 그 요소를 왼쪽으로 float된 블록 박스로 맊든다. float: right : 그 요소를 오른쪽으로 float된 블록 박스로 맊든다. float: none : 그 요소를 float 하지 않는다. float 속성을 적용하는 요소는 어떠한 형태로든 폭을 지정해야 하는 규칙이 있다. float는 뒤에 오는 엘리먼트에도 영향-float가 헤제되지 않는다. (clear 속성으로 해제 가능) ABYDOS Copyright abydos All rights Reserved.
  • 12. LAYOUT – 플로팅 해제 (clear) • Clear:both; – 박스이동, 정렬해제 (clear 속성) •속성 : clear •값 : left, right, none, both, inherit •기본값 : none •적용대상 : 블록 레벨 요소 속성 값에 대한 의미는 다음과 같다. • clear: none - float 유효, float는 해제되지 않는다. • clear: left - 왼쪽 float 해제 • clear: right - 오른쪽 float 해제 • clear: both - 좌우 양측 float 해제 clear 속성은 float 된 박스 뒤에 이어지는 박스가 인접하지 않게 배치하는 속성이 다. Float를 clear하는 4가지 방법. 예제를 보세요 http://naradesign.net/wp/2008/05/27/144/ ABYDOS Copyright abydos All rights Reserved.
  • 13. LAYOUT - 레이아웃 • 다음시갂에 이어서…^-^ ABYDOS Copyright abydos All rights Reserved.
  • 15. 과제 1. Css 네비게이션을 활용하여 현재 짂행중인 프로젝트 ‘용식이v1.0’의 네비게이션 메뉴를 맊든다. 2. Css 버튺이미지를 활용하여 현재짂행중인 프로젝트 ‘용식이v1.0’의 버튺 라이브러리를 맊든다. ABYDOS Copyright abydos All rights Reserved.