Click here to Skip to main content
15,906,624 members
Home / Discussions / Web Development
   

Web Development

 
QuestionGood book for HTML-Development ? Pin
Frygreen2-Oct-10 7:14
Frygreen2-Oct-10 7:14 
AnswerRe: Good book for HTML-Development ? Pin
Not Active2-Oct-10 10:09
mentorNot Active2-Oct-10 10:09 
AnswerRe: Good book for HTML-Development ? Pin
Gordon Brandly26-Oct-10 10:19
Gordon Brandly26-Oct-10 10:19 
QuestionIssue in building XML using Request.Form in asp pages Pin
Dpriya27-Sep-10 23:28
Dpriya27-Sep-10 23:28 
AnswerRe: Issue in building XML using Request.Form in asp pages Pin
vaghelabhavesh29-Sep-10 18:13
vaghelabhavesh29-Sep-10 18:13 
Questionsettimeout Pin
Ajay Kale New27-Sep-10 18:46
Ajay Kale New27-Sep-10 18:46 
AnswerRe: settimeout Pin
Peter_in_278027-Sep-10 19:40
professionalPeter_in_278027-Sep-10 19:40 
GeneralRe: settimeout Pin
Ajay Kale New27-Sep-10 19:52
Ajay Kale New27-Sep-10 19:52 
QuestionWhat's With h1, h2 ? ? ? [modified] Pin
W Balboos, GHB24-Sep-10 3:42
W Balboos, GHB24-Sep-10 3:42 
AnswerRe: What's With h1, h2 ? ? ? Pin
Sunasara Imdadhusen4-Oct-10 2:12
professionalSunasara Imdadhusen4-Oct-10 2:12 
GeneralRe: What's With h1, h2 ? ? ? Pin
W Balboos, GHB4-Oct-10 3:18
W Balboos, GHB4-Oct-10 3:18 
AnswerRe: What's With h1, h2 ? ? ? Pin
Macotti20-Oct-10 1:22
Macotti20-Oct-10 1:22 
GeneralRe: What's With h1, h2 ? ? ? Pin
W Balboos, GHB8-Nov-10 2:14
W Balboos, GHB8-Nov-10 2:14 
GeneralRe: What's With h1, h2 ? ? ? Pin
Macotti8-Nov-10 14:27
Macotti8-Nov-10 14:27 
AnswerRe: What's With h1, h2 ? ? ? Pin
W Balboos, GHB9-Nov-10 7:29
W Balboos, GHB9-Nov-10 7:29 
GeneralRe: What's With h1, h2 ? ? ? Pin
Macotti9-Nov-10 15:24
Macotti9-Nov-10 15:24 
Can I see your code?

I tried creating a test page using the style in your first post like this. I'm only assuming that you did it somewhat like this.

<html>
<head>
<title>CSS Test Page</title>
<style type="text/css">
.test h1,h2,h3,h4,h5,h6 {
   font-style:  italic;
}

.test h1,h3,h5 {
   color:  red
}
.test  h2,h4,h6 {
   color:  maroon;
}
</style>
</head>
<body>
<h1 class="test">Header 1</h1>
<h2>Header 2</h2>
<h3>Header 3</h3>
<h4>Header 4</h4>
<h5>Header 5</h5>
<h6>Header 6</h6>
</body>
</html>


Everything went as expected. Since styles with the syntax
<classname> <element>
{
    /*styles here*/
}


requires the element to be inside another element with the stated class. Like

<div class="test">
   <!--
    the element to adopt the style from the previous declaration
    -->
</div>


h2 was italicized though. your problem was it was not italicized right?
the color red for h1 and color maroon for h2 did not apply as expected.

you said you encountered no problem when you put it inside

<div class="test"></div>


right? try creating another set of headers outside the "div" tags and you will encounter the problem again.

I've been working with CSS for quite a while now. I'm just really curious about this. whatever you might have in mind about this, i'll be glad for a reply. Smile | :)
GeneralRe: What's With h1, h2 ? ? ? Pin
W Balboos, GHB10-Nov-10 3:21
W Balboos, GHB10-Nov-10 3:21 
QuestionExport excel data to SQL server in ASP Pin
priyaahh23-Sep-10 23:05
priyaahh23-Sep-10 23:05 
AnswerRe: Export excel data to SQL server in ASP Pin
Poonam Gandash6-Oct-10 2:40
Poonam Gandash6-Oct-10 2:40 
QuestionFree Adobe Flash Template Site Pin
jaglenn23-Sep-10 10:23
jaglenn23-Sep-10 10:23 
AnswerRe: Free Adobe Flash Template Site PinPopular
DaveAuld23-Sep-10 10:31
professionalDaveAuld23-Sep-10 10:31 
GeneralRe: Free Adobe Flash Template Site Pin
DaveAuld24-Sep-10 12:17
professionalDaveAuld24-Sep-10 12:17 
QuestionHow to Construct the Sidebar Menu Like the one at the left in the Codeproject Pin
sajid.salim.khan23-Sep-10 4:45
sajid.salim.khan23-Sep-10 4:45 
QuestionPROBLEM WITH IE8 AND ABOVE BROWSERS Pin
vallu_hari15-Sep-10 20:08
vallu_hari15-Sep-10 20:08 
AnswerRe: PROBLEM WITH IE8 AND ABOVE BROWSERS Pin
R. Giskard Reventlov15-Sep-10 20:35
R. Giskard Reventlov15-Sep-10 20:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.