Posts Tagged ‘CSS’

CSS object-fit property

Object-fit CSS property and value explination contain: if you have set an explicit height and width on a replaced element, object-fit:contain; will cause the content (e.g. the image) to be resized so that it is fully displayed with the intrinsic aspect ratio preserved, but still fits inside the dimensions set for the element. fill: causes the element's Read the full article...


Using Media Queries with CSS

Media Features for setting conditions in Media Queries Feature Value Min/Max Description width Length Yes Width of display area heigh Length Yes Height of display area device-width Length Yes Width of rendering area device-height Length Yes Height of rendering area orientation portrait or landscape No Orientation of device aspect-ratio Ratio Yes Ratio of width to Read the full article...


Positioning Elements with CSS

Positioning Elements position: type; Type can be: absolute, relative, static, inherit, fixed top: value; right: value; bottom: value; left: value;


How to Work with text in CSS

Font Short Hand font: font-style font-weight font-variant font-size/line-height   Special Text Styles text-decoration: type Type can be: none, underline, overline, or line-through text-transform: type Type can be: capitalize, uppercase, lowercase, or none font-variant: small caps Small caps is used for legal documents    


How to control word and letter-spacing with CSS

Controlling Spacing Term Description Kerning The amount of space between letters Tracking The amount of space between words Leading The space between lines of text Indentation Size of the indentation to first line   letter-spacing: value; word-spacing: value; line-height: value; text-indent: value;   Standard ratio is 1.2 double spaced = value of 2 Can be Read the full article...


How to vertical align an element with CSS

Note that these work primarily inside of tables. Vertical alginment options vertical Alignment Description baseline Aligns the element with the bottom of lowercase letters in surrounding text (the default) bottom Aligns the bottom of the element with the bottom of the lowest element in surrounding content middle Aligns the middle of the element with the Read the full article...


CSS Selector Reference

One notable reason for getting more creative with your CSS selectors is that it keeps you from having to pepper your markup with unnecessary classes. Writing lean HTML is great for SEO because you are (hopefully) describing your data in a more efficient manner and the search bots have less to dig through to read Read the full article...