Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > HTML / DHTML

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-06-2012, 04:28 AM   #1
davikerkrish
Registered User
 
Join Date: Jul 2012
Posts: 111
Set Multiple Classes on an HTML Element

<div class="class-1 class-2 class-3">
</div>

with all class names inside the same set of double quotes with a space between each. The CSS specificity is controlled by the order of the classes in your CSS file. If your CSS has:

class-2 {color: blue}
class-3 {color: green}
class-1 {color: red}
__________________

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.
davikerkrish is offline   Reply With Quote

Old 10-15-2012, 04:23 AM   #2
eswari
Registered User
 
Join Date: Aug 2012
Posts: 33
You can try like this, for using multiple classes on one HTML element,

First css file:

.title {
color: black;
border: 1px solid silver;
...
}

Second css file:

.title {
color: red;
}
__________________

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.
eswari is offline   Reply With Quote
Old 11-27-2012, 01:06 AM   #3
amitmax
Registered User
 
Join Date: Aug 2010
Posts: 215
Thanks for your suggestions but I would like share here this link as well:

http://webdesign.about.com/od/css/qt...smulticlas.htm

I hope it will give some more clear information.
amitmax is offline   Reply With Quote
Old 12-05-2012, 06:28 AM   #4
aegisisc
Registered User
 
Join Date: May 2012
Posts: 36
Well, see, the problem is that I want to assign two different classes on a table cell scale, so assigning one style to the table, one to the row, and one to the cell won't work because that wont give me fine enough precision to make the changes I want to make.
aegisisc is offline   Reply With Quote
Old 12-11-2012, 11:26 PM   #5
andrewhoward123
Registered User
 
Join Date: Dec 2012
Location: Ludhiana,Punjab,India
Posts: 39
I didn't know this that we can create multiple classes in an HTML element..
andrewhoward123 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 Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BasicDifference between HTML 5 and HTML 4 albertmorrison3 HTML / DHTML 14 12-06-2017 09:50 PM
<Figure> Element of HTML5 spinxwebdesign HTML / DHTML 0 07-04-2012 11:00 PM
HTML 5 and HTML 4 johnhedberg3 HTML / DHTML 3 06-16-2012 04:08 AM
Differences with HTML 4 and HTML 5 danielnelson HTML / DHTML 11 06-10-2012 09:21 PM
1.Basic distinguishing features of HTML 4 and HTML 5 rooseveltjobs HTML / DHTML 0 04-12-2012 10:00 PM


All times are GMT -7. The time now is 03:11 PM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.