在中继器控制中对齐不同大小的图像 [英] Different size of images align in repeater control

查看:75
本文介绍了在中继器控制中对齐不同大小的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

动态地将图像添加到转发器控件中,并且当我们将图像绑定到转发器控件中时,图像的大小是不同的,它将无法正确对齐它们,它应显示为图像的未对齐状态.如果放置了一些小图像,则下一个图像将无法正确对齐.

请引导我.

在此先感谢.

Hi All,

Dynamically adding images into the repeater control and the images are different sizes when we binding images into the repeater control it will not correctly align them, it should display like a dis alignment of the images. If there is some small images are placed their means then the next image is not correctly align them.

Please Guide me.

Thanks in Advance.

推荐答案

要么您必须固定图像标签的宽度和高度,然后在此维度上上传/调整图像大小.

因为如果您不解决此问题并且图像不是固定类型,那么显然它将看起来没有对齐.原因是用户可以上传垂直,水平,正方形,圆形等图像,并且基于此,您无法在图像和div之间固定位置或填充/边距.


希望您明白我的意思.
either you have to fixed width and height of image tag and upload/re-size image in this dimension.

because if you don''t fixed this and images are not fixed type then obliviously it will look without alignment. the reason behind this is user may upload vertical, horizontal, square, round etc images and based on that you can not fixed position or padding/margin between images and div.


Hope you got my point.


它是html,因此您可以根据需要使用CSS来使图像居中.通过将img控件的大小设置为始终相同,您甚至可以强制它们全部呈现相同的大小.
It''s html, so you can use CSS to centre the images if you like. You can even force them to all render the same size, by setting the size of the img control to always be the same.


这篇关于在中继器控制中对齐不同大小的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆