#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    365
    Rep Power
    11

    how to set styling for html: & bull;


    with css ive been using it to set the styling of tags
    a:hover {
    /*styling here*/
    }
    but how do i style (if its possible) a html character?
    Code:
    • {
       color:#cccccc;
    }
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Jun 2004
    Posts
    629
    Rep Power
    11
    It depends on how you are creating a bullet. If you are using the • entity, it is just a matter of applying a class to a SPAN tag and applying styles to that class:
    Code:
      /* CSS */
       span.bull { color: #ccc; }
       --------
      <!-- HTML -->
       <span class="bull">&bull;</span> Your text here
    If you are using lists however, it is a bit different. You would need to enclose the actual contents of the list item in another container such as a SPAN tag and apply the style to just the LI element (I used the style attribute for brevity):
    Code:
       <ul>
         <li style="color: #ccc;"><span style="color: #000;">Hello</span></li>
       </ul>
    You could also create an image of a bullet that is that color and apply the 'list-style-image' CSS property to the UL element (I used the style attribute for brevity):
    Code:
       <ul style="list-style-image: cccbullet.jpg">
         <li>Your text here</li>
       </ul>
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    11
    Rep Power
    0

    html entity style??


    have you figured out how to this with out creating a new class?? I'm trying to do something similar, but have not found the solution. Creating a new class doesnt really solve my problem because then I have to implement those new changes site wide. Any input would be greatly appreciated.
    thanks.


    Originally Posted by helz
    with css ive been using it to set the styling of tags
    a:hover {
    /*styling here*/
    }
    but how do i style (if its possible) a html character?
    Code:
    &bull; {
       color:#cccccc;
    }
  6. #4
  7. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1956
    That's the equivalent of styling the letter b. All a character entity is is an encoding for, um, characters. Not doable.

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo