开发者

Inserting space, padding between images with CSS

开发者 https://www.devze.com 2023-04-01 08:52 出处:网络
I am trying to add some images into a space which will c开发者_运维百科omprise two rows of 3 images each, so 6 in total.

I am trying to add some images into a space which will c开发者_运维百科omprise two rows of 3 images each, so 6 in total.

I have created a fiddle with the code in here http://jsfiddle.net/swAXU/2/

The images show how I would want them, however I want to add padding, or space in between each image to space them out?

Can anyone tell me how this can be done as changing the margin and padding attributes make no difference?


Adding margins does work: http://jsfiddle.net/swAXU/9/

Your CSS selectors were off. I just changed

.slidedeck dd.slide_3 img

to

.slidedeck dd img

and it works.


I think you were just accessing them wrong via css.

This works...

.slidedeck img {margin:20px;}


Or if you wanna get really fancy...

http://jsfiddle.net/swAXU/11/


img{margin:10px;}

?

That works... http://jsfiddle.net/Ep6rb/


Your <dd> element has no class.

Change your selector to .slidedeck dd img.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号