CSS Articles - Page 155 of 154

How to limit input text length using CSS3?

Vikyath Ram
Updated on 25-Feb-2020 07:28:19

1K+ Views

With HTML, you can easily limit input length. However, with CSS3, it will not be possible, since CSS can’t be used to limit the number of input characters. This will cause a functional restriction.CSS deals with presentation i.e. how your web page will look. This is done with HTML attribute malength, since it’s for behavior.Let’s see how to do it in HTML −ExampleYou can try to run the following code to limit input text lengthLive Demo           HTML maxlength attribute                        Student Name                    

How to create a modal popup using JavaScript and CSS?

Nishtha Thakur
Updated on 16-Jun-2020 13:05:24

642 Views

Creating a modal popup means adding a dialog box, which generates on click of a button and close when user clicks anywhere outside of the popup.Here’s how a popup looks like below with header and a text. You can also add a footer to it −To create a modal popup using CSS and JavaScript, try to run the following code −ExampleLive Demo                    .popup {             display: none;             position: fixed;             z-index: 1;   ... Read More

How do I hide an element when printing a web page?

Alshifa Hasnain
Updated on 13-Mar-2025 12:04:52

7K+ Views

In this article, we will learn to hide an element when printing a web page in JavaScript and HTML. When printing a web page, you can suppress elements such as navigation menus, advertisements, and interactive elements that you do not require on paper and print only the required information. Different Approaches The Following are the two different approaches to hiding an element when printing a web page − Using CSS Media Query Using JavaScript to Hide Elements Before Printing Using CSS Media Query The most common and efficient method to ... Read More

How to set text alignment in HTML?

Sharon Christine
Updated on 22-Aug-2024 12:52:36

238K+ Views

To align text in HTML, use the style attribute to define the CSS text-align property. Just keep in mind, that the usage of style attribute overrides any style set globally. It will override any style set in the HTML tag or external style sheet. HTML style attribute specifies an inline style for an element. The attribute is used with the HTML tag, with the CSS text-align property for the center, left, and right alignment. HTML5 does not support the align attribute of the tag, so the CSS style is used to set text alignment. Different ... Read More

In dynamic fashion setting a custom class to a cell in a row

Amit Sharma
Updated on 25-Feb-2020 11:07:08

150 Views

If you need to set CSS properties for a row, then what you can try is to use the predefined CSS class of the table along with the custom class. For Example.sapMListTbl . {    margin: 10px;    color: #ffffff; }Also, you can opt for a formatter while applying the new class along with your model classes.

Using CSS3 in SAP BSP application without using DOCTYPE tag

Amit Sharma
Updated on 30-Jul-2019 22:30:20

264 Views

To add a DOCTYPE tag without changing code of your BSP application, you can try using in Web Server, JQuery, or other UI libraries.There are various other libraries that you can search for as a replacement for CSS3 and they have their own advantage. I have used JQuery UI, Wijmo or Modernizer.

How do I center <div> tag using CSS?

Yaswanth Varma
Updated on 08-Jan-2024 16:16:50

473 Views

For web layout, it's essential to center a in CSS. The task of centering a div should be encountered by every developer at some point in their career, if not every day. Everybody has a handy approach, but it can occasionally be annoying for beginners. The visual appeal and usability of your web design are improved by these CSS approaches, which guarantee dynamic and smooth centering. Let’s look them one by one before that let’s have a quick view on the div tag. HTML div tag In an HTML, the tag is used as a division or section. ... Read More

Advertisements