HighDots Forums  

H1 + P

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss H1 + P in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
tranbert
 
Posts: n/a

Default H1 + P - 11-03-2003 , 06:41 AM






Hi

This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?

h1+p {
font-family: "Courier New", Courier, mono;
}

then in my document
<h1>Lorem ipsum</h1>
<p>sed do eiusmod tempor incididunt.</p>
<p>Ut enim ad minim veniam</p>

The first P should be in Courier New.
It works on Netscape 7



Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 07:09 AM






"tranbert" <tranbert (AT) regart2 (DOT) dyndns.org> wrote:

Quote:
This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?

h1+p {
font-family: "Courier New", Courier, mono;
}
It does not work on IE, as you can check from various sources like
http://www.blooberry.com/indexdot/css/index.html

You probably meant monospace, not mono. The font name mono is not one of the
defined generic names, so it would be taken as a denoting a specific font
under that name, and to the best of my knowledge, no such font exists.

The practical solution to styling the paragraph that follows an h1 element
is to assign a class to the p element and use a class selector in CSS.
Naturally this only works for pages that you can modify.

--
Yucca, http://www.cs.tut.fi/~jkorpela/


Reply With Quote
  #3  
Old   
Steve Pugh
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 07:10 AM



"tranbert" <tranbert (AT) regart2 (DOT) dyndns.org> wrote:

Quote:
This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?

h1+p {
font-family: "Courier New", Courier, mono;
}
That's right.
Adjacent selectors are just one of the things that IE doesn't support.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <steve (AT) pugh (DOT) net> <http://steve.pugh.net/>


Reply With Quote
  #4  
Old   
tranbert
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 09:05 AM



Ok thank you


Quote:
That's right.
Adjacent selectors are just one of the things that IE doesn't support.




Reply With Quote
  #5  
Old   
tranbert
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 09:07 AM



Thanks !

Quote:
You probably meant monospace, not mono.
Mmm ...this is what Dreamweaver inserts...
tsss...
:-(

Quote:
The practical solution to styling the paragraph that follows an h1 element
is to assign a class to the p element and use a class selector in CSS.
Naturally this only works for pages that you can modify.
That's what I'll do. (I did'nt want to create a new class just for that)

Thanks again




Reply With Quote
  #6  
Old   
Stan Brown
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 10:15 AM



In article <daadneQ7xMRw0Tui4p2dnA (AT) giganews (DOT) com> in
comp.infosystems.www.authoring.stylesheets, tranbert
<tranbert (AT) regart2 (DOT) dyndns.org> wrote:
Quote:
This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?
Yes, it doesn't. IE doesn't know about adjacent selectors.

Annoying, isn't it?

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/


Reply With Quote
  #7  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: H1 + P - 11-03-2003 , 11:10 AM



*Stan Brown* <the_stan_brown (AT) fastmail (DOT) fm>:
Quote:
IE doesn't know about adjacent selectors.
Mac-IE does, though.

Quote:
Annoying, isn't it?
Sure, OTOH it enables working around other bugs.

--
The Hitchhiker's Guide to the Galaxy:
"In the beginning the Universe was created.
This has made a lot of people very angry
and been widely regarded as a bad move."


Reply With Quote
  #8  
Old   
Neal
 
Posts: n/a

Default Re: H1 + P - 11-17-2003 , 05:54 PM




"tranbert" <tranbert (AT) regart2 (DOT) dyndns.org> wrote

Quote:
Hi

This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?

h1+p {
font-family: "Courier New", Courier, mono;
}

then in my document
h1>Lorem ipsum</h1
p>sed do eiusmod tempor incididunt.</p
p>Ut enim ad minim veniam</p

The first P should be in Courier New.
It works on Netscape 7


I have this in a CSS and it works in IE.

li.date, li.location {

font-family: Arial, Helvetica;
font-size: 8pt;
color: #000080;
list-style-type: none;

}






Reply With Quote
  #9  
Old   
Eric Bohlman
 
Posts: n/a

Default Re: H1 + P - 11-17-2003 , 06:00 PM



"tranbert" <tranbert (AT) regart2 (DOT) dyndns.org> wrote in
news:daadneQ7xMRw0Tui4p2dnA (AT) giganews (DOT) com:

Quote:
Hi

This syntax in CSS doesn't work in IE (IE6)?
Can you confim please ?

h1+p {
IE doesn't understand adjacent-sibling selectors.

Quote:
font-family: "Courier New", Courier, mono;
}

Reply With Quote
Reply




Thread Tools
Display Modes

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.