Hey, welcome to ZBCode, the premier coding forum for ZB. Here you fill find some of the best Invisionfree and Zetaboards Codes on the network! Unfortunately, you're sorta hovering around in guest mode at the moment; why not join in on the fun? Register an account and you can start accessing the wealth of resources we have available here. Enjoy your stay at ZBCode, and remember to tell all your friends about us; the more members, the more codes available. ![]() Interested in joining? Click here. If you are already a member of ZBCode, feel free to login right here: |
| Resize image on click | |
|---|---|
| Tweet Topic Started: Apr 3 2010, 09:56 PM (1,096 Views) | |
| Swordslam46 | Apr 3 2010, 09:56 PM Post #1 |
![]() ![]()
|
Placement: Above the Copyright / Below the Board Description: When an image is clicked it is resized to your specifications
Edit the red to the dimensions you want. |
![]() |
|
| Dorith | Apr 3 2010, 10:13 PM Post #2 |
![]()
Has just entered the Matrix
![]()
|
Shouldn't you make it so that it has a specific size when it first loads, then when you click it it then expands to normal size? |
![]() (Made emoticon using Codes Rock's Smiley Generator) | |
![]() |
|
| Swordslam46 | Apr 3 2010, 10:24 PM Post #3 |
![]() ![]()
|
Why would I do that Then I would need to figure out the dimensions of the image in the first place which will get confusing for user-uploaded images that are varying in size, that and chances are people will need to expand images, not shrink them |
![]() |
|
| Anicho | Apr 4 2010, 01:45 AM Post #4 |
![]()
|
How about with CSS? td.c_post img { height: 55px; width: 55px; } |
![]() |
|
| Gorgor | Apr 4 2010, 06:53 AM Post #5 |
|
Hello
![]()
|
You can do what Anicho said and you won't have to worry about users disabling JavaScript, Zetaboards also has a bbcode where you can do [img=height,width]url[/img] so you can resize images when you want. |
![]() |
|
| Swordslam46 | Apr 4 2010, 10:43 AM Post #6 |
![]() ![]()
|
This is still an easier way. With the BBC you have to ask users to surround every single one. And then you have people who don't want them resized and won't click on the images. With CSS every image is resized. And once again, some people may not want resized images. |
![]() |
|
| Lout | Apr 4 2010, 02:13 PM Post #7 |
![]() ![]()
|
You could also change this in the CSS -
To this -
And just adjust the 400px to whatever width you need so it doesn't stretch the page. Doing it this way only the images that are too large will get resized. You can also add a snippet for sig images if need be -
Again just adjust the px values to suit your needs. |
| |
![]() |
|
| screamscream | Apr 14 2010, 10:22 PM Post #8 |
![]()
|
Awesome code =D |
| |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · Zetaboards Modifications · Next Topic » |






















7:50 PM Jul 10