AmitDiwan has Published 10744 Articles

Text Decoration Using CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 13:17:48

95 Views

The CSS text-decoration property is used to apply decoration to selected element’s text. We can add a line-through, overline, underline, etc. as values. It is a shorthand for text-decoration-line, text-decoration-color and text-decoration-style.SyntaxThe syntax of text-decoration property is as follows −Selector {    text-decoration: /*value*/ }ExampleThe following examples illustrate CSS text-decoration ... Read More

Set Text Alignment Working with CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 13:09:49

697 Views

Using CSS text-align property we can horizontally set the text of an element. We can set it to left, right, justify or center.SyntaxThe syntax of CSS text-align property is as follows −Selector {    text-align: /*value*/ }ExampleThe following exmples illustrate CSS text-align property − Live Demo div { ... Read More

Styling Links Working with CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 12:59:14

193 Views

CSS allows us to style links as desired. We can format text, by adding colors, background, increase size, etc. Furthermore, animations can be added to create a pleasant visual effect.For proper functionality, the order of pseudo selectors is given by:- :link, :visited, :hover, :active.ExampleThe following examples illustrate styling of links ... Read More

Word Spacing Working with CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 12:55:27

75 Views

The CSS word-spacing property is used to specify the space between words of an element.SyntaxThe syntax of CSS word-spacing property is as follows −Selector {    word-spacing: /*value*/ }ExampleThe following examples illustrate CSS word-spacing property − Live Demo div {    display: flex;    float: left;    padding: ... Read More

Creating Media Dependent Style Sheets using CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 11:31:21

281 Views

Media dependent stylesheets are basic stylesheets only but apply to html document only when mediatype matches device type on which document is visible.We can create media dependent stylesheets by following methods −Using @media At-rulesUsing @import At-rulesUsing HTML element with media attributeExampleLet’s see an example for creating media dependent stylesheets ... Read More

CSS Central, Horizontal and Vertical Alignment

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 10:53:41

3K+ Views

We can align an element or the content inside it by using CSS which provides various options for alignment of an element and its content horizontally, vertically or in center.Horizontal AlignmentInline-elementsInline elements or inline-block elements such as text, anchor, span, etc. can be aligned horizontally with the help of CSS ... Read More

Pascal's Triangle in C++

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 10:15:49

6K+ Views

Pascal’s triangle is an array of binomial coefficients. The top row is numbered as n=0, and in each row are numbered from the left beginning with k = 0. Each number is found by adding two numbers which are residing in the previous row and exactly top of the current ... Read More

Setting Background Position in CSS

AmitDiwan

AmitDiwan

Updated on 08-Jan-2020 07:52:56

71 Views

The CSS background-position property is used to set an initial position for a background image relative to the origin.SyntaxThe syntax of CSS background-position property is as follows −Selector {    background-position: /*value*/ }The following examples illustrate CSS background-position property −Example Live Demo div {    margin: 30px;   ... Read More

Relative Positioning Working in CSS

AmitDiwan

AmitDiwan

Updated on 07-Jan-2020 12:48:08

549 Views

We can define positioning of an element in CSS as relative which renders the element normally. Elements with positioning method as relative are positioned by CSS Positioning properties (left, right, top and bottom).ExampleLet’s see an example for CSS Relative Positioning Method − Live Demo p {    margin: ... Read More

Removing Dotted Line around Active Links using CSS

AmitDiwan

AmitDiwan

Updated on 07-Jan-2020 12:35:32

3K+ Views

We can remove the default behavior of hyperlinks which is to show a dotted outline around themselves when active or focused by declaring CSS outline property on active/focused links to be none.Solutiona, a:active, a:focus {    outline: none; }ExampleLet’s see how to remove dotted line around active links with an ... Read More

Advertisements