Excellent Programming Tricks

Display | CSS Property


CSS3 Essentials
CSS display property define element's surrounding behavior with other element, every element on web page virtually rectangular box. Display property specify how the rectangle box behaves with other rectangle box.
  1. <display-outside>
    1. Specify element's outer display.
    2. Play flow layout role on web page.
      1. block: The element generates line breaks both after and before in the normal flow of the web page.
        1. <div>, <section>, <ul>, <p>, <h1>,...
      2. inline: The element generates line no breaks both after and before in the normal flow of the web page. Instead, next element will be on the same line if there is space.
        1. <span>, <em>, <b> ...
        2. Accepts margin and padding but works only horizontally not vertically.
        3. Not accept height and width.
  2. <display-inside>
    1. Outside behavior like block, inline or something. 
    2. In addition it is also define element's inner display type. Means inside content layout is specified by keyword values.
      1. table: Outside behavior acts like block-level box. Inside table element like HTML.
      2. flex: Outside behavior acts like block-level element. Inside layout model acts flex box model.
      3. grid: Outside behavior acts like block-level element. Inside layout model acts grid model.  
      4. subgrid:  If the parent element has grid, the element itself and its content are laid out according to the grid model.
  3. <display-listitem>
    1. list-item: Separate list of elements are inline, but total list of item blocked by default.
  4. <display-internal>
    1. Some layout models like table, have a complex internal model.
    2. Children has different internal structure and complex also. Internal keyword value specify the behavior of the element.
  5. <display-box>
    1. Define when element acts like rectangular box or not.
    2. none: Turn off the display of an element. Take out the space. Remove from the tree.
  6. <display-legacy>
    1. Content surrounding single inline with self block level.
      1. inline-block
        1. Accept height and width.
      2. inline-table
      3. inline-flex
      4. inline-grid.
Ref:
1. https://css-tricks.com/almanac/properties/d/display/
2. https://developer.mozilla.org/en-US/docs/Web/CSS/display

2 comments
  1. wonderful article contains lot of valuable information. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
    This article resolved my all queries.good luck an best wishes to the team members.continue posting.learn digital marketing use these following link
    Digital Marketing Course in Chennai

    ReplyDelete


Authentic аnd Excellent

Website

HTML Template

Wordpress Theme

Database applications

OR

Application services?

Excellent Programming Tricks (EPT) || Iftekhar-IT || We develops the Web applications and the WordPress templates. || Excellent Programming Tricks (EPT)

© 2020 Blogger Theme by Iftekhar IT || Excellent Programming Tricks

Execllent Programming Tricks. Powered by Blogger.