WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] bold letter subject (15 posts)

  1. ronen
    Member
    Posted 8 years ago #

    I want to alter my wordpress site so that I can bold a specific letter in the subject line of a post, also in category names and author names.

    I have NO CLUE how to do this.

    In theory, I should imagine it will have to do with telling wordpress to replace and inputted capitalized letter with a lowercase bold version of that letter. I know there's a way to do this with the first letter of a post, I just need to find a way to control it (ie do it with caps, which I'm otherwise not using.)

    Any help would be appreciated. (I was advised the Podz might be able to help me).

    Here is a link to my wordpress site (http://cinemalog.net/blog)
    and my original designed HTML site, whose look I am desperately and incompetently trying to emulate
    (http://cinemalog.net/videolog.html)

    thanks to all

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    CSS can be used to style the first letter and as far as I know, no others automatically.

    You could not type billgates and expect CSS to be able to produce BillGates
    Certainly that is not in current css an I have no idea if it would be supported in CSS3

    I'd suggest you look around some of the CS specialist sites for ideas.

  3. ronen
    Member
    Posted 8 years ago #

    Could I type BillGates and set it to type billgates

    (with the b and the g bold)?

    Any ideas given comparison between html site and wordpress site? thanks for the advice

  4. Mark (podz)
    Support Maven
    Posted 8 years ago #

    The only way I see that it can work is for you to define two classes, and set the appearance for the first letter then run the words together:

    <p class="ronen">Bill<p class="ronen">Gates

    .ronen {
    text-transform:lowercase;
    display:inline;
    font-weight:bold;
    }

    Or something like that. (I've not had a coffee yet so brain no work :) )

  5. Errr, <span class="ronen">Bill</span><span class="ronen">Gates</span> might be better.

    (I've had one coffee, and my brain might start working soon)

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Definitely better :)

  7. Mark (podz)
    Support Maven
    Posted 8 years ago #

    .ronen {
    text-transform:lowercase;
    display:inline;
    first-letter:bold;
    }

  8. ronen
    Member
    Posted 8 years ago #

    waitasec ---- so that's what i should enter for my first and last names? and howabout getting multiple letters to bold?

    for an example of what im trying to do, see
    cinemalog.net/ontherun.html
    and my demo
    cinemalog/net/blog
    for the current wordpress/

    Where would i paste aformentioned text?

  9. ronen
    Member
    Posted 8 years ago #

    Also- is there a way for me to see a live update of what the blog page looks like as i alter the code, rather than having to upload it and reload it from the server?

    Thanks for all your help

  10. ronen
    Member
    Posted 8 years ago #

    Let me qualify that -- i want to apply this setting to the author names and subject names in the blog.

  11. ronen
    Member
    Posted 8 years ago #

    Right now, the code reads:

    <span class="boldcap"><?php the_author_firstname(); ?></span><span class="boldcap"><?php the_author_lastname(); ?></span>

    with the class 'boldcap' added to style.css, as directed.

    The text-transform to lowercase works (see Michael Chiert http://cinemalog.net/blog/?p=5) but the first-letter-bold does not.

    Any ideas why? (And here I thought we had it!)

  12. jalenack
    Member
    Posted 8 years ago #

    Yes, because you've got the wrong way of referencing the first letter. Use this:

    .boldcap:first-letter {
    font-weight: bold;
    }

    It's called a pseudo-element. Look it up :)

  13. ronen
    Member
    Posted 8 years ago #

    Groovy.

    Any ideas on how to get this working on the post subject list in the left menu?

  14. ronen
    Member
    Posted 8 years ago #

    Nope jalenack, doesn't work.

  15. jalenack
    Member
    Posted 8 years ago #

    Hey, that's because the element you're applying it to is not block-level. Use it on things like <p> and <div>, not <span> or <b>. You can make the <div> have display: inline, and then it will behave just like a <span>

    Have a look at this very informative page on pseudo-elements:
    http://www.w3schools.com/css/css_pseudo_elements.asp

Topic Closed

This topic has been closed to new replies.

About this Topic