Log in

View Full Version : Images in CMS 100 percent


xili4n
05-12-2011, 09:41 AM
I'd like the images shown on the CMS to be 100% width.
not within the articles, but only on the "overview" (/content)

Anyone know how to achieve this?

I've made a temp solution, but that screws up most of
my articles.

(You can see what I mean here --> http://www.modellflynytt.no/content/ )

Lynne
05-12-2011, 08:46 PM
I don't understand what you want. You seem to have set the images on that page to be 100% like you said you wanted, so what is wrong with what you did? What do you want it to look like if not how it looks like there?

xili4n
05-13-2011, 05:27 AM
The only solution I have found for achieving that is by setting Image Thumbnail Max to 100%
That screws up a lot of the articles, and I also have to make a custom setup for the other
image-sizes.

What I basicly want is to avoid changes to the stylevars (/common/image_xxxx_max), and just edit the output of content/cms page.

Lynne
05-13-2011, 04:46 PM
Then set the image size specifically for images on that page.
#section_content .fullwidth .cms_article_preview_image { max-height: 100%; max-width: 100% !important;}

xili4n
05-13-2011, 05:09 PM
woohoo!

Thanks a lot :)

Amazing how easy stuff is once you know where to look for it :)

xili4n
08-07-2011, 07:01 AM
Hmmm.. After upgrading to 4.5.1PL1 this setting no longer works?
Tried changing the size, but no luck :/

Lynne
08-07-2011, 03:42 PM
Where did you add the new css originally? I don't see it at all on your site.

xili4n
08-09-2011, 05:14 AM
Its in my vbcms.css

.article_preview_contents ul > li, .article ul > li {
list-style:disc inside; /* keeps the bullets from going inside the preview image */
}

.cms_article_preview_image, .showpreviewonly object {
border:{vb:stylevar vbcms_article_preview_image_border};
outline: {vb:stylevar vbcms_article_preview_image_outline};
float:{vb:stylevar left};
margin:{vb:stylevar vbcms_article_preview_image_margin};
}

.cms_article_preview_image {
max-height:400px;
max-width:100% !important;
}

.showpreviewonly object {
{vb:stylevar vbcms_article_preview_object_size};
}

Lynne
08-09-2011, 07:34 PM
My guess would be you have overwritten it. I do not see it in the css on your site right now.

xili4n
08-10-2011, 05:14 AM
I also thought of that, but I can find it if I search for it. (Search in templates)

Is there a better place to put custom CSS?

--------------- Added 1312962406 at 1312962406 ---------------

http://www.modellflynytt.no/temp/mfn_css_failure.jpg

As you can see in this image, its there... just not working :(

Lynne
08-10-2011, 02:37 PM
That is a "max-width" which is working. You could just change that to "width" if you actually want them to always be 100%

xili4n
08-10-2011, 02:55 PM
On versions prior to 4.1.5 the code worked fine.
It did what it should. Width max 100%, but max height 400px.

If I use width rather than max-width, I end up with a distorted
and crap quality image.

I put max-height:400px; width:100% !important; now, and you can see
the problem

Lynne
08-10-2011, 03:14 PM
But, the image size is 300px x 109px. It is showing that size. I don't understand what you want it to do.

xili4n
08-10-2011, 03:36 PM
No, the original image size is 688x250 as seen here:
http://www.modellflynytt.no/content/elefunfly-2011-256/

hmm. The CMS make thumbs for frontpage now??
gah...

Anyways.. What I want, is the first article to be 100% width, max 400px.
The rest of the articles on the category page should be 100%

First article should then be max 703px width, other articles 330px.

Lynne
08-10-2011, 03:52 PM
Yes, the CMS is finally making thumbs for the front page. It is not good to have the full size images on that page and use css only to shrink them.

xili4n
08-10-2011, 04:10 PM
the images on MY front page aint big anyway. Scaled and compressed...
I found the setting for thumb size, so all I need now, is the old
"functionality" to work. 100% width... :/

--------------- Added 1313006227 at 1313006227 ---------------

think I got it figured out now. just gotta find out how to re-generate the thumbs now ;)