How to set spesific Content width

Posted in: Newspaper
Post count: 5

Hello,

I want to use this theme to an old website that has thousands articles. The images on that website are 640px wide. But this theme need 696px wide images. So when I tried it all images look smaller than the text. They are not aligned with the text. So how can I cahnge the width of the text on the theme so that the text to be aligned with all 640px wide images? So, all I want is this theme to use 640px images instead of 696px it is using by default.

Thank you,
Endri

Post count: 22421

Hello,

Well if the images are only 640 px width and the text is 696 px, then the image will not be able to stretch as our theme does not stretch images. It only crops them. Unfortunately there is no automatic way of changing all posts at once from the theme or wp setiongs. One solution would be to use this css to try to force 696 px on the image:
.td-post-content .alignnone, .wpb_text_column .alignnone, .td_block_text_with_title .alignnone, .woocommerce #tab-description .alignnone, .mce-content-body .alignnone{
margin: 0 0px;
width:100%!important;
}

This code will work if your images have no alignment. if you have an alignment set to them from the wp settings then another code is required. Please specify the alignment you have on your images if you have one.

Thank you!

Post count: 5

Hello Bogdan,

Thanks for your reply. Here is the website: http://tripandtravelblog.com/

I think images are algned center.

So I need another code? An will that be ok or there could be any issues with the website?

Thanks,
Endri

Post count: 23312

Hello endel19,

The website seems to work as properly and I did not saw any problems in it.

Thanks for the message!

Post count: 5

Catalin I do not think you understood my question. Of course the website works fine because it is using another theme. An old theme that is not mobile responsive. And I want to change that and use your theme (newspapper). But newspapper has image width 696px wide and all my images are 640px wide. There are thousand posts on this blog and I cannot change all images. So if I use your theme all images on existing posts will be smaller than the text and will not look good. Images will not be aligned with the text.

So what should I do? Can I change the width of the content? So the text would be 640px wide instead of 696 it is now?

Post count: 23312

Hello endel19,

Sorry for my misunderstanding! So, if your images are on center alignment you will have to use a bit of CSS code to adjust them to right sizes. Place the code below in Custom CSS area, like this ->

.td-post-content .aligncenter, .wpb_text_column .aligncenter, .td_block_text_with_title .aligncenter, .woocommerce #tab-description .aligncenter, .mce-content-body .aligncenter{
margin: 0 0px;
width:100%!important;
}

Here you should see the result -> before using the code -> http://screencast.com/t/Oci6V2orArz and after using the code -> http://screencast.com/t/CL552x2uAlit

Thanks for your understanding!

Post count: 5

Hello Catalin,

Yes that is exactly what I want to do. Thank you. But the images are 640px wide so since they will get bigger the quality will be worse right?

Also what happens to the images I add to the future posts? From now on I will add bigger images. Does this code have an affect on future images?
Also could this css code create any problems with the website? Any conflicts or slow down the website?

Thank you,
Endri

Post count: 23312

Hello endel19,

On the future, if you will have a bigger image at your side, the code will not affect it. Please notice that the above CSS will enlarge the image which is too short than the normal size which should have them.

Thanks for the message!

Post count: 5

Thank you very much! I have used it and it works perfectly!

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.