View Full Version : Dynamic image size in MOTD
Backstabnoob
06-21-2010, 16:36
Hi, is it possible to make image in MOTD depend on his resolution? I actually tried like <img src="..." style="width:40%">, but it was still at the original size (like that players with 1280x1024 has a nice image that actually fits right on their monitor... and players with 800x600 won't see more than 1/4 of the image without scrolling). The style thing works only in browser, not ingame. Any help?
I do not think that it is possible. Only if there is a way for you to detect his resolution, I do not know if clients have cvars for that.
Backstabnoob
06-21-2010, 17:23
Oh, it's a pity.
Oh, it's a pity.
A way would be of asking the player for his resolution through a menu. And if he answers the menu you will remember him in a MYSQL database but this solution seems a bit too much.
I'm not sure if it will work but you could try a division or table with a background image and have that block element with 100% size.
I'm not sure if it will work but you could try a division or table with a background image and have that block element with 100% size.
I think that'll just cause clipping.
You can hack it up using JS, but I don't think the CS browser supports it.
vBulletin® v3.8.7, Copyright ©2000-2024, vBulletin Solutions, Inc.