Click here to Skip to main content
15,896,448 members
Home / Discussions / Web Development
   

Web Development

 
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 
AnswerRe: PROBLEM WITH IE8 AND ABOVE BROWSERS Pin
Eduard Keilholz22-Sep-10 1:47
Eduard Keilholz22-Sep-10 1:47 
QuestionConvert XML Google Calendar into RSS feed with feed43.com Pin
mundilev14-Sep-10 11:00
mundilev14-Sep-10 11:00 
QuestionVS2003 error Pin
Ajay Kale New13-Sep-10 17:35
Ajay Kale New13-Sep-10 17:35 
Questionre VS2003 error Pin
Ajay Kale New13-Sep-10 17:34
Ajay Kale New13-Sep-10 17:34 
QuestionCSS Image Sprites in IE7 Pin
hxhl957-Sep-10 14:51
hxhl957-Sep-10 14:51 
AnswerRe: CSS Image Sprites in IE7 Pin
Gerben Jongerius8-Sep-10 1:59
Gerben Jongerius8-Sep-10 1:59 
GeneralRe: CSS Image Sprites in IE7 Pin
hxhl958-Sep-10 12:15
hxhl958-Sep-10 12:15 
AnswerRe: CSS Image Sprites in IE7 Pin
jahangir_ahmad12-Sep-10 3:22
jahangir_ahmad12-Sep-10 3:22 

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.