YouTube Embedding affecting Search textbox styling (5 posts)

  1. Tim Priebe
    Posted 5 years ago #

    I've noticed this issue on two different sites I've coded recently. If I'm embedding YouTube videos by simply pasting the URL to the video page into a page or post, the height of the Search textbox in the sidebar shrinks.

    Compare this:


    to this:


    Any ideas?

  2. Ganners
    Posted 5 years ago #

    Remove the height attribute from:

    #sidebar #s {
    background: url(http://www.tandswebdesign.com/demo/sum/w1/wp-content/themes/summit/_img/search-box.png) no-repeat 0% 0%;
    border: 0px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    height: 19px;
    line-height: 19px;
    margin-bottom: 5px;
    padding: 5px 10px;
    width: 168px;

    That should do it

  3. Tim Priebe
    Posted 5 years ago #

    Ganners, once I do that, the height is completely wrong. I do need to be able to use a standard CSS height declaration.

    The really odd thing is that even adding !important to the height declaration seems to have no effect.

  4. Ganners
    Posted 5 years ago #

    I think I've found your problem, you have no Doctype Declaration, at the top of your header.php put in the following line:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    See if that works.

  5. Tim Priebe
    Posted 5 years ago #

    Sure enough, that fixed it! I recently enabled ob_gzhandler and ob_tidyhandler on all our themes, and apparently it stripped out the Doctype Declaration. Very odd! I hadn't noticed that until you pointed it out.

    I moved it to before those overflow buffers kicked in, and it's now showing up.


Topic Closed

This topic has been closed to new replies.

About this Topic