DocsSimpleHtml5AndCss
Working with CSS Support in an HTML5 Application
Contents |
Requirements for This tutorial
You need the following software:
- NetBeans IDE 7.3
Create Enterprise Application
To create the enterprise application:
- Download project template
- Create project from template
Project contains index, js libraries and css file
- Run project in Chrome
- Show menu and different screen sizes
- Enable Inspect in NetBeans
- Locate h4 text in editor
- Show style elements for h4 in CSS Rules and the rules that determine each property
- Click Edit CSS Rules to open dialog
- Add h4 element
- Click Add Property and then modify color in dialog -- show change in browser
- change screensize in browser
- create new stylesheet mycss
- add @media for small screen
- open options window and create @media code template for larger screen
- add second @media alt rules to css using template
- in browser, select email line - element highlighted in navigator window and CSS Rule
- view css properties for li in CSS Rules window
- demonstrate code completion by typing class, remove
- Select li element and right-click and choose Edit CSS Rules to open dialog
- Enter email as class and select an alt rule - note that the added code is visible in preview
- Select the mycss stylesheet
- When you add rule it is added to html file and css file
- In browser, switch between views to to show how rule is applied only in smaller screen sizes