Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

MyCode image w/h

#1
Hey Darth,

As some of you may or may not know, you can embed an image like so:
Code:
[img]url[/img]

However you should be able to specify a width and height too:
Code:
[img=50x50]url[/url]

This adds a width="50" and height="50" to the image tag. However in your global.css file you have the following class which is overwriting any custom image dimensions:
Code:
.scaleimages img {
   /* max-width: 100%; */
   height: auto;
   width: auto;
}

Now, the reason max-width is commented out, is because you also have the following, which overwrites the scaleimages:
Code:
#posts_container img {
   max-width: 100%;
}

Why do we use max-width and why is it required? The max-width: 100% is set to make sure that any image that is inside the post container is scaled to fit either the full size image, or the full size of the post container - which ever comes first. Without this, any image that has dimensions above that of the post container would completely break the page.

What's causing the custom dimensions to be overwritten? To put it simply, the scaleimages class. As we have already established the max-width attribute is obsolete due to the post_container img class. So the only attributes left are the height and width set at auto, this is requesting that the image uses its own pre-defined image dimensions.

Why does the .scaleimages class include the height: auto; width: auto;? I don't have a clue to be fair, as far as I'm aware it is not used in the default MyBB theme, so this has been added by Darth? As I'm not aware of his reasoning, and can't figure it out myself, so I deem this useless. Tongue

Solution? Remove the .scaleimages class from your CSS completely. Your post_container img class is handling the max-width attribute already, forcing any image regardless of original or custom dimensions to scale down to fit in the page. Any image smaller will hold it's original size or use the custom defined size.

PEAOYCE
[Image: forumonic-bar.png]...............[Image: xige-logo-png-blue-sml.png]
Latest snapshots: Postbit Design - Multi Login Modal (1) - Responsive Pollbar
Reply
#2
Thank you for the find. I'll get this fixed today!

It's an old theme with a lot of tweaks over the years. I've discovered more and more easter eggs of my own doing as time has gone by. Tongue

Reply
#3
(June 26th, 2018 at 6:34 PM)Darth-Apple Wrote: I've discovered more and more easter eggs of my own doing as time has gone by. Tongue

I do this daily. Tongue Even on things I worked on the week before, when I go back look again and I'm like wtf is this crap and think of an insanely better and more simple way of doing things. Tongue
[Image: forumonic-bar.png]...............[Image: xige-logo-png-blue-sml.png]
Latest snapshots: Postbit Design - Multi Login Modal (1) - Responsive Pollbar
Reply
#4
so... harry K. are you our official bug hunter now? lol.
"I reject your reality and subsitute my own." - Adam Savage, Mythbusters
[Image: 5.jpg]
Reply
#5
I'm thinking about making up a new honorary staff position and calling it the theme maintainer/official site designer. I'm an decent enough designer when I need to be, but I'm sort of the jack of all trades, master of none. In other words, I'm definitely no expert. Tongue

But I publicly offer that position to you @Harry K, if you so desire it. You are hands down one of the absolute best designers for MyBB I think I've ever seen. With the time constraints I've had lately, some of what we've been trying to do has been over my head, so I'd be honored to say the least. Big Grin

Thank you for all of the time you've spent helping to debug things. It has saved me a lot of time. Tongue

Reply
#6
(June 27th, 2018 at 5:34 AM)Darth-Apple Wrote: You are hands down one of the absolute best designers for MyBB I think I've ever seen.

Well I dunno about that. Blush Have you not heard of my favs? Mike Creuzer(Audentio starter, original mybb lead designer) Tushar Singh(started pixelmonkey years ago, then joined audentio) FMJ, pretty sure she works loosely with Audentio. Johnny S(Recently restarted his MyBB theming services, used to work at Demonate with me and effone.) Honorable mention would be iAndrew and his top quality free themes.

I guess you could put me in that list when I finally release a fully complete decent theme. Tongue

Anyway about the position, I'm honoured. Big Grin However I don't have a lot of time, currently juggling 2 clients projects along with my own site Re-Design to go with Colore. I'd love to help, and get my hands dirty, but it would be nothing majorly spectacular instantly. Tongue I would have to work on it in bits in my spare time.
[Image: forumonic-bar.png]...............[Image: xige-logo-png-blue-sml.png]
Latest snapshots: Postbit Design - Multi Login Modal (1) - Responsive Pollbar
Reply
#7
(June 27th, 2018 at 8:48 AM)Harry K. Wrote: I would have to work on it in bits in my spare time.

I mean.... you kinda already are. Tongue

You really have come a long way. Good ol' Xige days.

Good history tip: First ever reputation I gave Harry was NEGATIVE. Just so we can preserve for all time, his rep on IB started rough, before spork came in to save him. Big Grin

Quote:spork985 ( 249 ) - Last updated 05-14-2012, 12:06 PM
Positive (+1): nice forum

Jonathan ( 46 ) - Last updated 05-13-2012, 03:00 PM
Negative (-1): Pretty stupid suggestion to ddos the site down...

Guardian ( 55 ) - Last updated 05-13-2012, 12:11 PM
Negative (-1): Excessive and unnecessary posting.

Still ended with 56+, one more than me. I've been there since IB started and didn't take any time away. Just a frame of reference to show how much he grew, and how he surpassed me rather quickly. Tongue

Quote:Guardian ( 55 ) - Last updated 01-31-2014, 10:42 PM
Positive (+2): You've come a long way. Since I refuse to delete that first rep, this is for the memories.
Reply
#8
(June 27th, 2018 at 9:46 PM)Guardian Wrote:
(June 27th, 2018 at 8:48 AM)Harry K. Wrote: I would have to work on it in bits in my spare time.

I mean.... you kinda already are. Tongue

You really have come a long way. Good ol' Xige days.

Good history tip: First ever reputation I gave Harry was NEGATIVE. Just so we can preserve for all time, his rep on IB started rough, before spork came in to save him. Big Grin

Quote:spork985 ( 249 ) - Last updated 05-14-2012, 12:06 PM
Positive (+1): nice forum

Jonathan ( 46 ) - Last updated 05-13-2012, 03:00 PM
Negative (-1): Pretty stupid suggestion to ddos the site down...

Guardian ( 55 ) - Last updated 05-13-2012, 12:11 PM
Negative (-1): Excessive and unnecessary posting.

Still ended with 56+, one more than me. I've been there since IB started and didn't take any time away. Just a frame of reference to show how much he grew, and how he surpassed me rather quickly. Tongue

Quote:Guardian ( 55 ) - Last updated 01-31-2014, 10:42 PM
Positive (+2): You've come a long way. Since I refuse to delete that first rep, this is for the memories.

<3 you guys! I honestly couldn’t have done it without any of you and the support you all have given me over the years at IB Big Grin IB will be deeply missed, I wish we could have it online as a legacy, loads of people have done the same, effone first dived into web development and MyBB on IcyBoards and he is now staff over at MyBB! Plenty more that have learnt their first steps there and grown to become great designers, developers and more, the community was great! Smile
[Image: forumonic-bar.png]...............[Image: xige-logo-png-blue-sml.png]
Latest snapshots: Postbit Design - Multi Login Modal (1) - Responsive Pollbar
Reply
#9
(June 27th, 2018 at 10:47 PM)Harry K. Wrote: <3 you guys! I honestly couldn’t have done it without any of you and the support you all have given me over the years at IB Big Grin  IB will be deeply missed, I wish we could have it online as a legacy, loads of people have done the same, effone first dived into web development and MyBB on IcyBoards and he is now staff over at MyBB! Plenty more that have learnt their first steps there and grown to become great designers, developers and more, the community was great! Smile

I know. People have literally grown up on IB. So much time and history.... just history. Undecided

Sorry, I took the topic way off. Tongue
Reply
#10
Well said @Guardian. I will miss the community beyond what words can express. Personally it's probably what really got me into MyBB. Simlink and I stumbled upon it looking for good hosts just out of curiosity. We were just... shocked. At the time it was quite a surprise. Finna

@Harry K. Believe me man I understand that feeling 100%. I've been busy beyond my wildest dreams. It's pushed me to my limit! Finna

Your time spent debugging and helping tweak things has not gone unnoticed. If you wanted the position, it'd be honorary and would not come with any obligations attached! Actually, we weren't even planning any sort of major-scale redesign at this time. Our current theme works great and has continued to get great feedback and support from everyone. Besides some tweaks and making it responsive of course! Tongue

Totally up to you, no strings, obligations, or pressure attached whatsoever!

Reply




Users browsing this thread: 2 Guest(s)

Dark/Light Theme Selector

Contact Us | Makestation | Return to Top | Lite (Archive) Mode | RSS Syndication 
Proudly powered by MyBB 1.8, © 2002-2024
Forum design by Makestation Team © 2013-2024