Is there a <div>
or <span>
equivalent for having by default the CSS property display: flex
?
Is there a or equivalent for having by default the CSS property display: flex;?
Asked
Active
Viewed 57 times
0
Kunj
- 1,980
- 2
- 22
- 34
Dimitri Kopriwa
- 13,139
- 27
- 98
- 204
-
No, but you can find a soluton here: http://stackoverflow.com/questions/9845011/are-custom-elements-valid-html5 ... which answers might be a possible duplicate to this question
– Asons
Feb 16 '17 at 10:33
2 Answers
1
No such thing exists at the moment :(
But...
You could make your own in some browsers...
HTML:
<flex>
<div>Foo</div>
<div>Bar</div>
</flex>
CSS:
flex {
display: flex;
}
Eamonn
- 418
- 3
- 11
-
2
-
-
Forgive my possible lack of understanding, but that seems to be for creating custom elements with special functionality. All we're doing here is dropping some CSS on an arbitrary block.
– Eamonn
Feb 16 '17 at 12:57
Asked
Active
Viewed 57 times
0

Kunj
- 1,980
- 2
- 22
- 34

Dimitri Kopriwa
- 13,139
- 27
- 98
- 204
-
No, but you can find a soluton here: http://stackoverflow.com/questions/9845011/are-custom-elements-valid-html5 ... which answers might be a possible duplicate to this question – Asons Feb 16 '17 at 10:33
2 Answers
1
No such thing exists at the moment :(
But...
You could make your own in some browsers...
HTML:
<flex>
<div>Foo</div>
<div>Bar</div>
</flex>
CSS:
flex {
display: flex;
}

Eamonn
- 418
- 3
- 11
-
2
-
-
Forgive my possible lack of understanding, but that seems to be for creating custom elements with special functionality. All we're doing here is dropping some CSS on an arbitrary block. – Eamonn Feb 16 '17 at 12:57