Embed presentation
Download to read offline





![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany6(Source: catswhocode)Many front end developers often find it difficult to center a text or elementvertically. But the CSS3 specialization, the display: flex value or property helpto easily align any task or elements.<div class="align-vertically">I am vertically centered!</div>With display: flex you can specify a flexbox layout, by using align-items: centeryou can make the element vertical centering.Horizontal Centering:With three things you can horizontally center the block level elements in CSS.The first thing to follow is to explicitly set the element width; the next thing todo is to auto set the left and right margins.With a proper doctype, you can keep the older version of the IE from goinginto quirks mode[CSS]div#page {Width: 960px; margin: 0auto}[/CSS]Using this you can center the div and id of the page present inside the parentcontainer.](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-6-2048.jpg&f=jpg&w=240)
![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany7Fluid Images:For creating a fluid image, the maximum width is to be set as 100%.[css]Img {max-width: 100%}[/css]As IE, doesn’t go with max-width, but IE treats the property of width ads it wasthe maximum width.To set the IE maximum widths follow:[css]Img {width: 100%}[/CSS]Setting various classes on HTML Element:To set multiple classes on HTML, you should follow:[xhtml]<div class= “class1 class-2 class-3”></div>[/xhtml]Giving all the class names with a space between every class in the same set ofdouble quotes. This helps to control the CSS specificity by the order of theclasses in your CSS file.However, if your CSS has](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-7-2048.jpg&f=jpg&w=240)
![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany8[css]Class-2 {color: blue}Class-3 {color: green}Class 1 {color: red}[/css]Then your text present in the div is read as class-1 is to be declared at the endin the CSS. The order of the classes that show in the HTML is irrelevant.CSS Specificity:If two or more CSS selectors get conflicting instructions in a single htmlelement, In such case you get a choice to do, you get to choose the styles youneed. It is done using the CSS specificity calculations. It is expressed in the formof (a,b,c,d).[css]Element, Pseudo Element: d = 1 – (0,0,0,1)Class, Pseudo class, Attribute: c = 1 – (0,0,1,0)Id: b = 1 – (0,1,0,0)Inline Style: a = 1 – (1,0,0,0)[/css]Responsive CSS Grid:Responsive CSS grid offers many ways of developing a customizable grid. It canbe operated with equal or unequal column sizes.](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-8-2048.jpg&f=jpg&w=240)





The document discusses advanced CSS techniques for web development, emphasizing the importance of CSS in enhancing website design and layout. It includes tips on utilizing features like flexbox, masking, and responsive grids to optimize user experience and maintain modern aesthetics. Additionally, it highlights the significance of consistency and specificity in CSS to efficiently organize web content.





![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany6(Source: catswhocode)Many front end developers often find it difficult to center a text or elementvertically. But the CSS3 specialization, the display: flex value or property helpto easily align any task or elements.<div class="align-vertically">I am vertically centered!</div>With display: flex you can specify a flexbox layout, by using align-items: centeryou can make the element vertical centering.Horizontal Centering:With three things you can horizontally center the block level elements in CSS.The first thing to follow is to explicitly set the element width; the next thing todo is to auto set the left and right margins.With a proper doctype, you can keep the older version of the IE from goinginto quirks mode[CSS]div#page {Width: 960px; margin: 0auto}[/CSS]Using this you can center the div and id of the page present inside the parentcontainer.](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-6-2048.jpg&f=jpg&w=240)
![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany7Fluid Images:For creating a fluid image, the maximum width is to be set as 100%.[css]Img {max-width: 100%}[/css]As IE, doesn’t go with max-width, but IE treats the property of width ads it wasthe maximum width.To set the IE maximum widths follow:[css]Img {width: 100%}[/CSS]Setting various classes on HTML Element:To set multiple classes on HTML, you should follow:[xhtml]<div class= “class1 class-2 class-3”></div>[/xhtml]Giving all the class names with a space between every class in the same set ofdouble quotes. This helps to control the CSS specificity by the order of theclasses in your CSS file.However, if your CSS has](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-7-2048.jpg&f=jpg&w=240)
![From the Resource Library of Andolasoft.Inc | Web and Mobile App DevelopmentCompany8[css]Class-2 {color: blue}Class-3 {color: green}Class 1 {color: red}[/css]Then your text present in the div is read as class-1 is to be declared at the endin the CSS. The order of the classes that show in the HTML is irrelevant.CSS Specificity:If two or more CSS selectors get conflicting instructions in a single htmlelement, In such case you get a choice to do, you get to choose the styles youneed. It is done using the CSS specificity calculations. It is expressed in the formof (a,b,c,d).[css]Element, Pseudo Element: d = 1 – (0,0,0,1)Class, Pseudo class, Attribute: c = 1 – (0,0,1,0)Id: b = 1 – (0,1,0,0)Inline Style: a = 1 – (1,0,0,0)[/css]Responsive CSS Grid:Responsive CSS grid offers many ways of developing a customizable grid. It canbe operated with equal or unequal column sizes.](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2forganizeyourwebsitewithadvancedcsstricks-211006135302%2f75%2fOrganize-Your-Website-With-Advanced-CSS-Tricks-8-2048.jpg&f=jpg&w=240)



