Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    list text doesn't hold <p> text formatting

    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?

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    did you try this
    ul: {styles}
    ??

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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;}

  • #4
    New Coder
    Join Date
    Nov 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?

  • #5
    New Coder
    Join Date
    Nov 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the text after the list loses formatting also. so not only would i like to format the list but keep text formatting after it.

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    NL
    Posts
    421
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>

  • #7
    New Coder
    Join Date
    Nov 2002
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts
    doh. guess that solves the mystery


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •