Found 1564 Articles for CSS

Usage of CSS visibility property

Chandu yadav
Updated on 25-Jun-2020 09:56:20

148 Views

A property called visibility allows you to hide an element from view. You can use this property along with JavaScript to create very complex menu and very complex webpage layouts.The visibility property can take the values listed in the table that followsValueDescriptionvisibleThe box and its contents are shown to the user.hiddenThe box and its content are made invisible, although they still affect the layout of the page.collapseThis is for use only with dynamic table columns and row effects.ExampleYou can try to run the following code to learn how to work with visible and hidden values               ... Read More

Values of CSS overflow property

Lakshmi Srinivas
Updated on 25-Jun-2020 09:54:37

136 Views

CSS provides a property called overflow that tells the browser what to do if the box's contents are larger than the box itself. The following are the values of overflow property −ValueDescriptionVisibleAllows the content to overflow the borders of its containing element.HiddenThe content of the nested element is simply cut off at the border of the containing element and no scrollbars are visible.ScrollThe size of the containing element does not change, but the scrollbars are added to allow the user to scroll to see the content.autoThe purpose is the same as a scroll, but the scrollbar will be shown only if the ... Read More

What to do when an element's content might be larger than the amount of space allocated to it?

karthikeya Boyini
Updated on 04-Mar-2020 12:29:43

47 Views

Use the CSS overflow property to solve this issue of a content exceeding the allocated space. You can try to run the following code to solve the issue −Example                   .scroll{          display:block;          border: 2px solid green;          padding:10px;          margin-top:10px;          width:300px;          height:50px;          overflow:scroll;       }       .auto{          display:block;          border: 2px solid green;     ... Read More

Which property is used to tell the browser what to do if the box's content is larger than the box itself?

Arjun Thakur
Updated on 25-Jun-2020 09:52:58

98 Views

CSS provides a property called overflow which tells the browser what to do if the box's contents are larger than the box itself. This property can take one of the following values −ValueDescriptionvisibleAllows the content to overflow the borders of its containing element.hiddenThe content of the nested element is simply cut off at the border of the containing element and no scrollbars are visible.scrollThe size of the containing element does not change, but the scrollbars are added to allow the user to scroll to see the content.autoThe purpose is the same as a scroll, but the scrollbar will be shown only ... Read More

Set the minimum width that a box can be with CSS

Samual Sam
Updated on 04-Mar-2020 12:27:48

259 Views

The min-width property is used to set the minimum width that a box can be. The value of the min-width property can be a number, a length, or a percentage.Example                            This paragraph is 100px high and min width is 400px          This paragraph is 100px high and min width is 400px                

Set the maximum width that a box can be with CSS

George John
Updated on 04-Mar-2020 12:18:06

87 Views

The max-width property is used to set the maximum width that a box can be. The value of the max-width property can be a number, a length, or a percentage.Example                            This paragraph is 200px high and max width is 100px          This paragraph is 200px high and max width is 100px                

Usage of margin-right property with CSS

Lakshmi Srinivas
Updated on 04-Mar-2020 12:18:39

70 Views

The margin-right specifies the right margin of an element. It can have a value in length, % or auto. You can try to run the following code to set the right margin −Example                            This is a paragraph with a specified right margin                      This is another paragraph with a specified right margin in percent          

Create layers using CSS

Ankith Reddy
Updated on 04-Mar-2020 12:17:03

73 Views

To create layers using CSS, you can try to run the following code. I have used the the z-index propertyExample                                                    

Set the width of a box with CSS

Chandu yadav
Updated on 04-Mar-2020 12:15:08

178 Views

The width property is used to set the width of a box. They can take values of a length, a percentage, or the keyword auto. ExampleYou can try to run the following code to set the width −                            This paragraph is 200pixels wide and 50 pixels high          

CSS min-width property

Chandu yadav
Updated on 04-Mar-2020 12:13:58

157 Views

The min-width property is used to set the minimum width that a box can be. The value of the min-width property can be a number, a length, or a percentage.Example                            This paragraph is 100px high and min width is 400px          This paragraph is 100px high and min width is 400px              

Advertisements