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 3 of 3
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    h1 with a special style

    my css has a general style for h1


    i now made a special style

    #itemheaderh1{font-family:arial;font-size:15px;color:#8A1228;font-weight:bold;}

    but when i do <h1 id="itemheaderh1">
    it still uses the master h1 style

    what am i doing wrong?

  • #2
    Senior Coder
    Join Date
    Jan 2005
    Location
    Memphis, TN
    Posts
    1,785
    Thanks
    8
    Thanked 131 Times in 129 Posts
    do you have your h1's defined elsewhere in the css? You need to rewrite all the rules you applied to the base h1 if you do. If not try
    Code:
     h1#itemheaderh1{font-family:arial;font-size:15px;color:#8A1228;font-weight:bold;}
    and see if that works. If not still, maybe a link so we can find the conflicting code.
    Stop making things so hard on yourself.
    i is tugbucket :: help raise tugburg :: Whitehaven Kiwanis

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by esthera View Post
    my css has a general style for h1


    i now made a special style

    #itemheaderh1{font-family:arial;font-size:15px;color:#8A1228;font-weight:bold;}

    but when i do <h1 id="itemheaderh1">
    it still uses the master h1 style

    what am i doing wrong?
    probably is not this case, but if you have more the one h1, using id don't work because each id must be uniq. you can use class instead.

    best regards


  •  

    Posting Permissions

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