![]() ![]() This will center text in CSS & Text will be centralized & will display to the center Text will be displayed to the right hand side ![]() Text will be left aligned & this the by default value for all the elements We can assign Text-align property to following values to determine the alignment of the text. There are more values that we can set to this property. You can set any one value to text-align property. The 4 mostly used values are left, center, right & justified. The text can be aligned with the help of 4 mostly used values as per the requirement of the web designer. To make the text centered or right aligned in CSS we have to do the work of applying the style to the element containing the text. By default the text is left aligned in an element. The text-align property has other values to shift the text to other positions. Just applying the center value to the text-align property will make the text centered. The text will be horizontally aligned & text will be accurately centered without doing anything extra. The text-align property is used to center align the text within an element. Multiple ways are available to center the text & you need to choose the correct one that matches your requirement by applying the right CSS to right elements on the web page. The users of the website access your website from various different browsers & devices. There are CSS properties that are supported in one browser but fail to render in another browser. This is related to the responsiveness of the website. In some cases the design looks properly in one device but the page design is disturbed in the other size of device. Some CSS when applied incorrectly dis-aligns the rest of the elements on the web page & it becomes difficult later to identify the cause of the dis-alignment. When one thing goes wrong it may result in everything gone wrong. When correct styles are not applied then it results in disturbing the design of the complete web page. While applying CSS to the web page the developer should have accurate information about applying the correct CSS properties that will bring the desired results. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |