Oversized images breaking the visual aspect of templates

Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions
Author Message
EA6500v1
DD-WRT User


Joined: 06 Feb 2016
Posts: 50
Location: /etc

PostPosted: Tue Jul 18, 2017 16:26    Post subject: Oversized images breaking the visual aspect of templates Reply with quote
Adding the following line in the img class of common.css/default CSS file will fix the oversized image attachment issue that breaks visual aspects of the forums when users do that:


Code:
max-width: 100%;


So that it looks like the img class contents look like:
Code:
img {
   border-width: 0;
   max-width: 100%;
}


Here's an example of what I mean (with an image that has a high width to it): https://www.dd-wrt.com/phpBB2/viewtopic.php?t=310219

This should be done to the common.css or default CSS under each theme, which are currently two (ddwrt and subSilver)

I am guessing this is something only BS can do?
Sponsor
al_c
DD-WRT Guru


Joined: 13 Apr 2013
Posts: 2134
Location: Ottawa Canada

PostPosted: Wed Aug 16, 2017 22:04    Post subject: Re: Oversized images breaking the visual aspect of templates Reply with quote
EA6500v1 wrote:
Adding the following line in the img class of common.css/default CSS file will fix the oversized image attachment issue that breaks visual aspects of the forums when users do that:


Code:
max-width: 100%;


So that it looks like the img class contents look like:
Code:
img {
   border-width: 0;
   max-width: 100%;
}


Here's an example of what I mean (with an image that has a high width to it): https://www.dd-wrt.com/phpBB2/viewtopic.php?t=310219

This should be done to the common.css or default CSS under each theme, which are currently two (ddwrt and subSilver)

I am guessing this is something only BS can do?


I suggested the following changes several months ago... crickets...
Code:
.attachtable img {
    max-width: 600px;
}
.attachtable img:hover {
    cursor: zoom-in;
}
.attachtable img:active {
    max-width: none;
}


This would restrict the images by default to a set width but if you clicked them, they'd pop out to full size... alternatively, you could put the max-width into the :hover selector

You could make things a little more robust by also looking at images in .postbody...

Al
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Generic Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum