...

View Full Version : list text doesn't hold <p> text formatting



audiophan
11-20-2002, 11:43 PM
my <p> tag has text styles accociated with it. everything is fine until i place a <ul> list in the paragraph. then the test type, style, etc change to what i can only assume is default.

is there a way to continue text properties through a list? or do i need to specify the properties over again, attached to the <ul> tag?

chrismiceli
11-21-2002, 04:42 AM
did you try this
ul: {styles}
??

La Gal
11-21-2002, 05:13 AM
You can group selectors that share styles. Don't forget to seperate them with a comma.

p, ul {font:12px/16px verdana,arial;}

If you want to give one of the selectors additional formatting, you can define it again by itself.

p {padding:1em;}

audiophan
11-21-2002, 06:40 AM
Originally posted by chrismiceli
did you try this
ul: {styles}
??

i did. hoping their is an easier way to carry over <p> formatting to a <ul>.

basically the only way to do it is change all my p.class styles, including links and etc., to:

ul, p.class {style}
ul, p.class a {style}

etc?

audiophan
11-21-2002, 02:42 PM
the text after the list loses formatting also. so not only would i like to format the list but keep text formatting after it.

MCookie
11-21-2002, 03:03 PM
Nesting a list in a paragraph is not valid. Browsers END the paragraph where the list starts, but don't start a new paragraph where the list ends.
<p>
<ul>
<li></li>
<li></li>
</ul>
</p>

Better try this;
<p></p>
<ul>
<li></li>
<li></li>
</ul>
<p></p>

audiophan
11-21-2002, 04:18 PM
doh. guess that solves the mystery



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum