• 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:

    https://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?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    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?

    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.

    Thread Starter kittel

    (@kittel)

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

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

    Many thanks again

    Martin

    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?

    Thread Starter kittel

    (@kittel)

    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

    Thread Starter kittel

    (@kittel)

    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

    Thread Starter kittel

    (@kittel)

    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

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘CSS Help twentytwelve’ is closed to new replies.