I was creating a one column page for my wordpress 3.0 site the other day, and ran into this surprise. I was trying to add an image to my content that was 800 pixels wide.
The TwentyTen WordPress Theme and images
When I tried to insert the image into my content, wordpress kept scaling the image down. It wouldn’t let me place the image full size. No matter what I did, I couldn’t get the image to full size.
TwentyTen has a default maximum width set on content
After trying every normal html and CSS proceedure, I couldn’t get the image to the proper size. Come to find out, The default wordpress theme, TwentyTen has a max-width set on all the content. This max-width is set at 640px.
How to fix?
The way I fixed the problem was with one line of code added to the end of my css file:
#content img {max-width: 900px;}
The problem with this of course is that now when you add an image to a post, you could add an image 900px wide. Another way I could have solved the problem, was to place the css code in the page I was working on. It would have looked like this:
<img style=”max-width: 900px;” ……
This fix is only needed on the onecolumn-page.php template
The TwentyTen Default WordPress Theme comes with a full page template called “onecolumn-page.php”. You can choose to use this template when you are creating your page from the page editor window in your admin area.
If you found this useful, please let us know
If you found this useful information, please let us know. Better yet, if there is a better way to solve the problem, by all means help everyone out. Leave your info in a comment and if it’s useful, I will add it to the body of this post with a link to the page you fixed.