I'm trying to use css to put some images this way:
|_________<img1_1>|___<img2_1&g开发者_运维问答t;|
| |<___img2_2>|
| |__<_img2_3>|
All the images should be align right and i cannot use a fixed width size because the size of the images may vary.
Image img1_1 is to the left off all the others (but still align right of the page).
plz help!
with CSS
set all images float to right
for images 2_2 and 2_3 set clear:right
If it's supposed to be a layout - consider using DIVs to create regions on the page.
Create a content div and put another 2 divs in it. Set float of one of them to right and give it a width. Set a margin on the other one. Put images in them.
Using a float: right
with an inline-block
should work fine.
float
can, in some rare cases, produce varying results accross browsers, however it works well 99% of the time.
James
You can wrap all the images in a div tag add a class or an id and set the class/id to text-align: right; or float all the images to the right .class img { float: right; }
精彩评论