The document contains information about fluid and responsive web design. It discusses using relative units like percentages for image widths to make them fluid and scale to different screen sizes. It also covers using fluid grids, media queries to apply different styles based on screen width, and hybrid designs that combine fixed and fluid elements. Code examples are provided for common fluid grid layout structures.
111. img { max-width: 100%;
height: auto; }
Fluid Images
One way around this is to size images in relative units, rather
than absolute
pixel dimensions.
The most common relative solution is to set the max-width at
the image at 100%
and the data-fullsrc attribute
sagar 11119-02-2015
112. Fluid Grids
A fluid is a substance that continually
deforms (flows) under an applied shear
stress Wikipedia
Regardless of what the device or screen size
is, components in fluid designs are going to
flow and adapt to the user environment.
sagar 11219-02-2015
113. Media Queries
<link rel="stylesheet"
media="screen and (max-width:
640px)" href="smallscreen.css"
type="text/css" />
Target specific screen sizes with Different styles
You can change styles depending on :
Height and width of the browser
Screen resolution
Orientation of the device
sagar 11319-02-2015
114. In a fluid website
layout, also referred
to as a liquid layout,
the majority of the
components inside
have percentage
widths, and thus
adjust to the users
screen resolution
Fixed-width
layouts
Liquid layouts
A fixed website
layout has a
wrapper that is a
fixed width, and
the components
inside it have either
percentage widths
or fixed widths. sagar 11419-02-2015
115. Elastic layouts Hybrid layouts
There are hybrid
layouts, which
combine the
characteristics of
two or more of the
layouts discussed
It works by sizing
all elements
with ems.
sagar 11519-02-2015
116. The advantages of grid
layouts are numerous :
Gives order, originality, and harmony to the
presentation of content;
Allows users to predict where to find the
information they need
Makes it easier to add new content without
having it looking disjointed or marginalized.
Custom Grid Layouts
sagar 11619-02-2015