You can use em
, %
, px
. But in combination with media-queries
See this Link to learn about media-queries. Also, CSS3 have some new values for sizing things relative to the current viewport size: vw
, vh
, and vmin
. See link about that.
More Related Contents:
- Detect the type of font that is displayed in an image [closed]
- Is there a CSS selector for elements containing certain text?
- Responsive css background images
- Any way to declare a size/partial border to a box?
- Add a CSS border on hover without moving the element [duplicate]
- Control the dashed border stroke length and distance between strokes
- Scrolling a flexbox with overflowing content
- Font Awesome 5 – why aren’t icons like bitcoin, facebook, twitter showing?
- Does css hover work on mobile devices?
- How can I remove the outline around hyperlinks images?
- Text on image mouseover?
- Responsive css styles on mobile devices ONLY
- how to reset a CSS variable (aka custom properties) and use the fallback one?
- CSS rounded corners in IE8
- Is there such a thing as an “all inclusive sibling” CSS selector?
- CSS Best Practice about ID and Class?
- What does @-moz-document url-prefix() do?
- Styling elements with a dot (.) in the class name
- CSS file blocked: MIME type mismatch (X-Content-Type-Options: nosniff)
- Css Content, Attr and Url in the same sentence
- CSS Transform with element resizing
- Correct terms and words for sections and parts of selectors
- How to add a margin to a table row [duplicate]
- Clip/Crop background-image with CSS
- CSS negative z-index: what does it mean?
- How to make a Bootstrap 4 full width dropdown in Navbar?
- Why doesn’t my child element inherit color from its parent when parent has more specific selector?
- Stacking DIVs on top of each other?
- Div with cut out edges, border and transparent background
- Select specific element before other element