I've added an Image field for blog posts on my site and I've set a maximum size for uploaded images.

But it doesn't matter because for some reason, the image is being stretched to 100% of the page width.

Example: http://frinkers.net84.net/content/ive-added-image-uploads

I scaled the image down and re-uploaded it but it looks worse now because of the lower resolution. Is there any small change I can make in the theme or CSS files to fix this?

CommentFileSizeAuthor
#6 2013-11-15_20-28-52.png78.12 KBDanny Englander
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Danny Englander’s picture

Component: User interface » Code
Assigned: Unassigned » Danny Englander
Status: Active » Fixed

Hi, I fixed this in dev a few days ago and made a new release as well. Unfortunately releases are a bit broken right now due to the drupal.org D7 upgrade so your best bet is to download via git:

git clone --branch 7.x-1.x highrockmedia@git.drupal.org:project/gratis.git

Otherwise you can wait for 7.x-1.2 to appear on the project page. If it gets to be too long, send me a pm and I'll get you a zip file.

Danny Englander’s picture

smileymalaise’s picture

Oh thanks highrockmedia

It is fixed. I'm sorry I have taken up this space with such a "newbie" question!

Danny Englander’s picture

Well now that I've fixed the width issue, the new code takes care of some of this in the sense that it will scale the image to a max width but your image needs to be big enough in the first place. You'll also need to tweak some settings within Drupal. You can set the image style for the imagefield itself on the display settings page and you can also create new image styles as well. There's also settings for min / max on the upload setting as well. You may want to check out drupalize.me. they have some free videos for beginners that should help you with a lot of this.

smileymalaise’s picture

Well, all those other settings have already been fixed, so I knew it had to be the CSS.

I really appreciate the help because I am not as proficient in CSS as say HTML.

I do have one more question maybe you can help me with. My images have a title "Image:" before them. ( http://frinkers.net84.net/content/ive-added-image-uploads )

Check out the updated code, the width is perfect and I have set max width boundaries! But I would like to remove the "image" title from the image field. Do you know what I mean?

Danny Englander’s picture

FileSize
78.12 KB

You'll need to hide the label located on the display settings page for your content type. (see my screen capture). These and other questions are all basic Drupal questions that you'd probably want to get help with by watching some videos such as the site I mentioned above. Thanks for using Gratis!

smileymalaise’s picture

You are now one of my favorite people ever!

smileymalaise’s picture

Ugh I appreciate the newbie help. I didn't used to be a newbie, I was once in charge of several professional sites using Drupal but that was maybe 2-3 years ago and I've gone through some troubling times since then.

This latest site is my latest attempt to become relevant once again but I've found that a lot of things have changed and/or I have forgotten some basic things about Drupal.

I really appreciate your help with this, and this is one of the cleanest themes I've ever seen!

Danny Englander’s picture

I can relate and I hope all goes well with getting back in to Drupal. It makes me happy to be able to help in some small way. Depending on where you live you should look up your local Drupal user group or camp.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mpark’s picture

I think better solution is add some code to .css like this here: /web/sites/all/themes/gratis/css

input:not([type=submit]):not([type=file]):not([type=radio]):not([type=checkbox]):not([type=reset]):not([type=image]) {
margin: 0 0 4px 0;
padding: 8px 2px 8px 8px;
width: 100%;
border: 1px solid #d1d1d1;
color: #666;
font-size: 1.3rem;
}