Forums

Style Width for Attachment_xxx (image in posts) (3 posts)

  1. iamchristianm
    Member
    Posted 1 month ago #

    Good day folks

    Whenever i insert a picture in one of my posts, the width of the attachement container is set to 695px - this results in a distorted display of the image.

    With Firefox and Firebug, i can see an
    element.style {
    width:695px;
    }

    i've searched for the string 695 and element.style. There's a menu.js which does:

    setStyle = function(element, key, value) {
    element.style[key] = value-35; <= tested here
    }

    getStyle = function(element, key) {
    return element.style[key];
    }

    but it seems that changes to this file does not change the element.style width property...

    here's the affected page: http://www.christiano.ch/wordpress/2009/10/05/connexin-remote-desktops-v2-released/

    where can the - in my case - 695px width be changed?

    helps appreciated!

    Thanks,

    Christian

  2. flachsi
    Member
    Posted 1 month ago #

    hey,
    open media.php in the wp-includes folder.

    search for this line (approximately line 596):

    return '<div ' . $id . 'class="wp-caption ' . $align . '" style="width: ' . (10 + (int) $width) . 'px">'

    this line basically tells wp, to add the element style with additional 10px width than the image-width is.

    just change the line to this
    return '<div ' . $id . 'class="wp-caption ' . $align . '" >'

    and no additional pixels are added to the width.

  3. YOUAREtehSCENE
    Member
    Posted 1 month ago #

    Yes, I'm having problems with pictures in posts, when I upload them to tinypic.com @ 640x480 they are wicked squished

    check this post
    http://youarethescene.net/?p=950
    that pic is @ 640x480 where, would I go to change the picture width and height in the posts???

    I'm using this theme
    http://wordpress.org/extend/themes/takteek01

    Thanks

Reply

You must log in to post.

About this Topic

Tags

No tags yet.