Define Measurement in Screen Pixels with CSS

mkotla
Updated on 30-Jan-2020 07:27:48

188 Views

To define a measurement in screen pixels with CSS, use the px unit.Let us see an example:                            This div has relative positioning.          

Using CONCAT_WS Function with MySQL WHERE Clause

Sharon Christine
Updated on 30-Jan-2020 07:26:58

440 Views

When we use CONCAT_WS() function with WHERE clause then the output would be based upon the condition provided in WHERE clause. It can be understood from the example of ‘Student’ table as followsExamplemysql> Select CONCAT_WS(' ',Name, Last_name, 'Resident of', Address, 'is studying', Subject)AS 'Student Detail' from student WHERE id = 20; +----------------------------------------------------------------+ | Student Detail                                                 | +----------------------------------------------------------------+ | Gaurav Rathore Resident of Jaipur is studying Computers        | +----------------------------------------------------------------+ 1 row in set (0.00 sec)

Descendent Selectors in CSS

Samual Sam
Updated on 30-Jan-2020 07:25:02

493 Views

Suppose you want to apply a style rule to a particular element only when it lies inside a particular element. As given in the following example, style rule will apply to element only when it lies inside tag.ul em {    color: #FFFF00; }Suppose now for element and style rule applied to :ol strong {    color: #808000; }

Type Selectors in CSS

varma
Updated on 30-Jan-2020 07:24:30

1K+ Views

A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.With the type selector, set for HTML tags like h1, h2, h3, p, etc:h2 {    color: #FF0000; }Set for p:p {    color: #800000; }

What is a Selector and How It Is Used in CSS

Lakshmi Srinivas
Updated on 30-Jan-2020 07:23:49

449 Views

A selector is an HTML tag at which a style is applied. This could be any tag like or etc.The following figure describes what a Selector is:Let us see an example of Type Selector, to set color:h1 {    color: #36CFFF; }

Base Overloading Methods in Python

Mohd Mohtashim
Updated on 30-Jan-2020 07:22:55

448 Views

Following table lists some generic functionality that you can override in your own classes −Sr.No.Method, Description & Sample Call1__init__ ( self [,args...] )Constructor (with any optional arguments)Sample Call : obj = className(args)2__del__( self )Destructor, deletes an objectSample Call : del obj3__repr__( self )Evaluable string representationSample Call : repr(obj)4__str__( self )Printable string representationSample Call : str(obj)5__cmp__ ( self, x )Object comparisonSample Call : cmp(obj, x)

Style Rules in CSS

Sreemaha
Updated on 30-Jan-2020 07:22:37

6K+ Views

CSS comprises of style rules interpreted by the browser and then applied to the corresponding elements in your document. A style rule is made of three parts −Selector -  A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.Property - A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color, border etc.Value - Values assigned to properties. For example, the color property can have value either red or #F1F1F1 etcYou can put CSS Style Rule Syntax as ... Read More

Universal Selectors in CSS

radhakrishna
Updated on 30-Jan-2020 07:21:53

727 Views

A selector is an HTML tag at which a style will be applied. This could be any tag like or etc.With the type selector, set for HTML tags like h1, h2, h3, p, etc:h2 {    color: #FFFF00; }Rather than selecting elements of a specific type, the universal selector simply matches the name of any element type:* {    color: #FFFF00; }

Comparison of CSS Versions

Lakshmi Srinivas
Updated on 30-Jan-2020 07:21:17

1K+ Views

Cascading Style Sheets, level 1 (CSS1) was came out of W3C as a recommendation in December 1996. This version describes the CSS language as well as a simple visual formatting model for all the HTML tags.CSS2 became a W3C recommendation in May 1998 and builds on CSS1. This version adds support for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning, and tables.CSS3 became a W3C recommendation in June 1999 and builds on older versions CSS. it has divided into documentation is called as Modules and here each module having new extension features defined in CSS2.CSS3 is ... Read More

Overloading Operators in Python

Mohd Mohtashim
Updated on 30-Jan-2020 07:21:12

564 Views

Suppose you have created a Vector class to represent two-dimensional vectors, what happens when you use the plus operator to add them? Most likely Python will yell at you.You could, however, define the __add__ method in your class to perform vector addition and then the plus operator would behave as per expectation −Example Live Demo#!/usr/bin/python class Vector:    def __init__(self, a, b):       self.a = a       self.b = b    def __str__(self):       return 'Vector (%d, %d)' % (self.a, self.b)    def __add__(self, other):       return Vector(self.a + other.a, self.b + other.b) v1 = ... Read More

Advertisements