473,394 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Selector for text or <p> after <H2>?

I run the web site for a University department. A few of
my authors will carefully write:

<h3>Title</h3>
<p>Some text here.</p>
<p>Second paragraph.</p>

Most of us can't be bothered(!):

<h3>Title</h3>
Some text here.
<p>Second paragraph.

I would like my margin under the <h3> to be a little less than my
margin between paragraphs. My problem is that I can't seem to come up
with a selector that distinguishes between the two cases above, ie <h3>
immediately followed by <p> and <h3> followed by text then <p>.

A selector like: h3 + p matches both. Is there a selector for 'naked'
text?

Thanks

John
Jul 21 '05 #1
1 2102
Will this not be matched by rules for "body"?

--
####################
## PH, London
####################
"John Rowe" <ro**@excc.ex.ac.uk> wrote in message
news:vn************@kenny.ex.ac.uk...
I run the web site for a University department. A few of
my authors will carefully write:

<h3>Title</h3>
<p>Some text here.</p>
<p>Second paragraph.</p>

Most of us can't be bothered(!):

<h3>Title</h3>
Some text here.
<p>Second paragraph.

I would like my margin under the <h3> to be a little less than my
margin between paragraphs. My problem is that I can't seem to come up
with a selector that distinguishes between the two cases above, ie <h3>
immediately followed by <p> and <h3> followed by text then <p>.

A selector like: h3 + p matches both. Is there a selector for 'naked'
text?

Thanks

John

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Wayne... | last post by:
I'm trying to make a sort of source code libary for some customers of commonly used code to save them a bit of time the problem I have is that although I can get the asp code into a field of an...
0
by: Arne Schirmacher | last post by:
I want to display a MySQL database field that can contain HTML markup. If I use <esql:get-string> then I get all of the database field, but all tags are escaped which is not what I want. If I use...
14
by: slim | last post by:
hi all, whilst creating a mock-up site, i am trying to follow the rules and guidelines i have been digesting over the last few months with regards to css positioning and accessibility. well,...
1
by: Speedy | last post by:
I have the following html body implemented in a site. But as soon as I added the <div> tag the <a> is not function any longer... Can someone tell me why this is not working ? Cheers Speedy ...
4
by: Christofer Dutz | last post by:
Hi, I am having a small problem, that is driving me nuts. My application reads some Xml and runs 2 Xsl Transformations to generate HTML. As soon as my second XSL introduces some <br/tags, the...
7
by: mark | last post by:
Hi All, Apologies for the newbie question but I've searched and tried all sorts for a few days and I'm pulling my hair out ; Please feel free to teach me to suck eggs because it's all new to me...
1
by: shivani anand | last post by:
Hi.. I have a doubt. I have some code.. <span class="test1"> my screeen </span> I simply changed it to. <h2 class = "test1"> my screen </h2>
3
by: ddailey | last post by:
The code which follows is something I cobbled together quite hastily to display to students a way of illustrating HTML source code (including CSS and JavaScript) alongside a page as rendered. I've...
1
mikek12004
by: mikek12004 | last post by:
I use <h2> for my hedings which leaves some default space above and below it, how can I decrease the above space with css? (tried margin-bottom:-5px but didn't work, why?)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.