Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-28-2014, 10:27 PM   #1
Bates John
Registered User
 
Join Date: Sep 2014
Posts: 15
What are selectors in CSS?

Selectors help to select an element to which you want to apply a style. For example below is a simple style called as ‘intro” which applies red color to background of a HTML element.
Collapse | Copy Code

<style>
.intro
{
background-color:red;
}
</style>

To apply the above “intro” style to div we can use the “class” selector as shown in the below figure.
Collapse | Copy Code

<div class="intro">
<p>My name is Shivprasad koirala.</p>
<p>I write interview questions.</p>
</div>
__________________
John Bates


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bates John is offline   Reply With Quote

Old 09-29-2014, 04:14 AM   #2
jameskamroon1
Registered User
 
Join Date: Sep 2014
Location: CALIFORNIA
Posts: 27
They are following:
1. Id selector
2. Class selector
3. Element selector
4. Grouping Selector.
jameskamroon1 is offline   Reply With Quote
Old 09-29-2014, 04:51 AM   #3
Alekyap
Registered User
 
Join Date: Sep 2014
Posts: 7
selectors in CSS are as follows:
1. Universal selector
2. Type selectors
3. Descendant selectors
4. Child selectors
5. Adjacent sibling selectors
6. Attribute selectors
7. ID selectors
Alekyap is offline   Reply With Quote
Old 10-09-2014, 11:23 PM   #4
softech
Registered User
 
Join Date: Oct 2014
Posts: 1,401
Thanks for Sharing...
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
softech is offline   Reply With Quote
Old 10-13-2014, 02:46 AM   #5
johnstyle
Registered User
 
Join Date: Dec 2013
Posts: 327
For reference w3schools is the best place
johnstyle is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:59 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.