WordPress.org

Ready to get started?Download WordPress

Forums

Responsive text sizing in Twenty Eleven (5 posts)

  1. jennifer2010
    Member
    Posted 1 year ago #

    Hi Everyone!

    I'm using the Twenty Eleven WP theme.

    I have a div for a special section with larger font. I'd like this to automatically resize as the browser window shrinks, just like the rest of the text does (mainly the post titles, etc)

    Here's my CSS:

    .video_callout {
    height:150px;
    width:90%;
    border-top:1px solid;
    border-bottom:1px solid;
    border-color: #d1d1d1;
    margin-left:auto;
    margin-right:auto;
    margin-top:5%;
    }
    .callout_text {
    width:50%;
    float:left;
    text-align:center;
    margin-top:2.5%;
    }
    .callout_image {
    width:50%;
    float:right;
    text-align:center;
    margin-top:2.5%
    }
    .callout_text span.label {
    font-style:italic;
    font-size:35px;
    color:#393939;
    }
    .callout_text span.duration {
    color:red;
    font-size:30px;
    }

    Does anyone know how I can make this specific text responsive?

    Thank you!

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Define font size in a percentage or em.
    E.g

    font-size: 8%;
    font-size: 1.3em;
  3. esmi
    Forum Moderator
    Posted 1 year ago #

    Is this a child theme?

  4. jennifer2010
    Member
    Posted 1 year ago #

    @Andrew - that doesn't work. The size of the font stays the same regardless of what unit or measurement is used. I specifically would like the font size to be responsive based on the size of the browser being used.

    @esmi, yes.

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    If you post a link to your site, someone may be able to offer more specific help.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.