Professional Documents
Culture Documents
DotNet Unit4
DotNet Unit4
Unit-4 2
Way to represent HTML Tags. (.css)
Latest version CSS 4
A CSS rule-set consists of a selector and a
declaration block:
The selector points to the HTML element you
want to style.
The declaration block contains one or more
declarations separated by semicolons.
Unit-4 3
Single element type:
Unit-4 4
1. element Selector
The element selector selects elements
based on the element name.
p{
text-align: center;
color: red;
}
Unit-4 5
2. id Selector
The id selector uses the id attribute of an
HTML element to select a specific element.
To select an element with a specific id,
write a hash (#) character, followed by the
id of the element.
It is used to set differenet styles for same
kind of HTML Tag.
Not Possible to apply multiple id on same
HTML Tag.
#para1 {
text-align: center;
color: red;
}
Unit-4 6
3. class Selector
The class selector selects elements with a
specific class attribute.
To select elements with a specific class,
write a period (.) character, followed by the
name of the class.
It is used to set multiple styles for single HTML
Tag.
Possible to apply multiple class on single
same HTML Tag.
.center {
text-align: center;
color: red;
}
cssClass Property is used to set css class.
Unit-4 7
Unit-4 8
Define look of pages and web controls.
Applied on server. So we can change at runtime.
Themes are control based not HTML based.
App_Theme Folder
Theme Folder contains
1. .skin File
2. CSS
3. Images and other resources
Only 1 Theme can be applied to each page.
Default Skin: Automatically applies to all controls.
SkinID is not defined.
Named Skin: Control skin with a SkinId property
set. Do not apply automatically.
EnableTheming Property: True/False
Unit-4 9
Create consistent look and behavior for all
pages in your web application.
Provides a template for other pages.
It defines placeholders for content. Output is
combination of master page and content page.
Extension: .master
Can’t run Master page directly.
Master page also have code behind file.
Master page can be nested.
Website can contain many master pages.
Master page should contain at least one place
holder.
Content place holder can be customized.
Unit-4 10
At Runtime, master page and content page will be
merged.
Here, content page will not have <html>, <head>,
<body> or <title> Tag.
<%@ Master Language=“VB”
CodeFile=“File1.aster.vb” Inherits=“File1” %> 11
Unit-4
http://hpjagad.blogspot.com
Unit-4 12