From 6150106ae589c4d82eadef0144cce1eab2ac0883 Mon Sep 17 00:00:00 2001 From: jackyzha0 Date: Sun, 7 Mar 2021 13:45:21 -0800 Subject: css fix --- frontend/src/components/decorators/Labelled.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/decorators/Labelled.js b/frontend/src/components/decorators/Labelled.js index 0d7fe39..35cd58a 100644 --- a/frontend/src/components/decorators/Labelled.js +++ b/frontend/src/components/decorators/Labelled.js @@ -3,8 +3,11 @@ import React from "react"; const StyledLabel = styled.label` position: relative; - & > span { - position: absolute; + & > div:first-child { + position: absolute; + } + & > div > span { + display: block; transform: translateY(-0.2em); font-weight: 700; font-size: 1em; @@ -22,9 +25,9 @@ const FloatingLabel = (props) => -export const Labelled = ({label, value, children}) =>
- +export const Labelled = ({label, value, children}) => +
{label} - {children} - -
\ No newline at end of file +
+ {children} + \ No newline at end of file -- cgit v1.2.3