WordPress.org

Ready to get started?Download WordPress

Forums

CSS Help twentytwelve (9 posts)

  1. kittel
    Member
    Posted 8 months ago #

    Hi, I am still new to CSS, trying to re-develop this website using twentytwelve and have not quite solved this probably simple issue, yet:

    http://www.vasectomy.me.uk/cms

    1) Currently, I remove the existing title from every page and manually enter the company logo "Thames Valley Vasectomy Services" into every page using an <h1> tag. This is rather cumbersome and unelegant. Is there a way to put this in every time above the actual header of the page using CSS?
    2) what would be the code in CSS if I put this logo into an image file. Would this be the better solution for mobile display? Could I have your valued opinion, please?
    3) On ipad, the display is really bad, because it hyphenates the last word, is there a way to turn it from an <h1> into an <h2> tag if there is a reduced number of pixels?

  2. Andrew
    Forum Moderator
    Posted 8 months ago #

    Is there a way to put this in every time above the actual header of the page using CSS?

    No, if you want that do it with PHP (copy header.php over from the parent theme and paste into your Child Theme)

    what would be the code in CSS if I put this logo into an image file.

    What are you envisaging CSS for here?

    Would this be the better solution for mobile display?

    To what problem?

    On ipad, the display is really bad, because it hyphenates the last word

    Which last word?

  3. CrouchingBruin
    Member
    Posted 8 months ago #

    Is there a way to put this in every time above the actual header of the page using CSS?

    This might work:

    article header.entry-header:before {
       content: "Thames Valley Vasectomy Services";
       font-weight: bold;
       font-size: 21px;
       color: #00a;
       text-align: center;
       display: block;
    }

    what would be the code in CSS if I put this logo into an image file. Would this be the better solution for mobile display?

    I'm not sure what you're asking, either. Do you want to change the site title and description into an image instead of text?

    On ipad, the display is really bad, because it hyphenates the last word, is there a way to turn it from an <h1> into an <h2> tag if there is a reduced number of pixels?

    You can set the hyphens property to none in your CSS if you don't want your words to hyphenate. You can also set the font size smaller using a media query in your CSS.

  4. kittel
    Member
    Posted 8 months ago #

    Thank you so much for both suggestions. I will try them tomorrow.

    In terms of my display problem in ipad: see uploaded image http://vasectomy.me.uk/cms/?p=339
    "Services" is hyphenated. What do you both feel would be the best solution?

    Many thanks again

    Martin

  5. CrouchingBruin
    Member
    Posted 8 months ago #

    Did you read the end of my post above? Try both suggestions and see which one you like the best. The "best solution" is a little subjective: do you want a larger font size and have the word wrap to the next line, or do you want a smaller font which might prevent the word from wrapping, but is harder to read?

  6. kittel
    Member
    Posted 8 months ago #

    Hi CB, have not quite been able to do it yet, but will try this weekend. Thank you for pointing my nose towards media queries, too. Didn't know and it is fascinating! Just started up with CSS and it will hopefully be a steep learning curve! Martin

  7. kittel
    Member
    Posted 8 months ago #

    Hi CB, the first bit of code is working perfectly, thank you so much. Will now look into the detail of your further advice. Martin

  8. kittel
    Member
    Posted 8 months ago #

    The code was really helpful and will be helpful for anybody, who wants to put some simple text above any page entry automatically via CCS, so thank you very much again, CrouchingBruin. Its still resident in my website. Martin

  9. CrouchingBruin
    Member
    Posted 8 months ago #

    You're welcome, Martin, glad it worked out. Please mark this thread as resolved so everyone knows that the problem has been fixed.

Reply

You must log in to post.

About this Topic