3 embed images in CSS?

The site uses 3 different types of accommodation schedules:
  • hspace="10" vspace="10" align="left"
  • hspace="10" vspace="10" align="right"
  • no positioning at all.


As the most compact to write General CSS and call of a particular type for a particular image on the page?
July 8th 19 at 15:48
2 answers
July 8th 19 at 15:50
Solution
css
.image-margin {margin: 10px;}
.pull-right {float: right;}
.pull-left {float: left;}

html
<img src="path/to/picture" class="image-margin pull-right">
<img src="path/to/picture" class="image-margin pull-left">
<img src="path/to/picture" class="pull-left">
<img src="path/to/picture" class="pull-right">
<img src="path/to/picture" class="image-margin">
Is it possible to reduce the type of class to .m .r .l and match the class as "m r"? - Maida53 commented on July 8th 19 at 15:53
: of course, what's the difference to call - Henderson_Beat commented on July 8th 19 at 15:56
: And most importantly, it is possible not only to apply but also to other units. Are everywhere this logic will get a mini css framework. Highly recommended for familiarization and use of: getbootstrap.com/css - Henderson_Beat commented on July 8th 19 at 15:59
: Last question - how to implement the wrapping pictures with text? Because now when you click on classes the picture is above the text. - Maida53 commented on July 8th 19 at 16:02
: float: left; - this is the flow. - Henderson_Beat commented on July 8th 19 at 16:05
July 8th 19 at 15:52
All of these attributes are deprecated.
float s will save you.

>> As most compactly write the common CSS
The selector class.

>> call of a particular type for a particular image on the page
In what sense is the challenge? If you have the necessary css file and it has the necessary properties for the selectors that they apply.
And is there any online services to check CSS for compliance with modern requirements? - Maida53 commented on July 8th 19 at 15:55
: w3schools.com? on developer.mozilla.org well described what was happening.
If Russian, it is, perhaps webref.ru (htmlboor.ru). - Henderson_Beat commented on July 8th 19 at 15:58
The management of Maxim how to implement the wrapping pictures with text? Because now when you click on classes the picture is above the text. - Henderson_Beat commented on July 8th 19 at 16:01
: the float property is responsible for the flow.
It's all incredibly easy to Google.
+ do not forget about the image sizes, let's see what the clear property, etc. - Maida53 commented on July 8th 19 at 16:04

Find more questions by tags Web DevelopmentCSS