Search
 
SCRIPT & CODE EXAMPLE
 

CSS

change br height

// Use this instead of <br> so you can use css to change height:
/* The best spacer ever invented */
hr.space-1 {
  background: transparent;
  color: transparent;
  margin: 0;
  border-style: none;
  height: 1vw;
}
<hr class="space-1">
Comment

change br line height

You can't change the height of the br tag itself, as it's not an element that takes up space in the page. It's just an instruction to create a new line.

You can change the line height using the line-height style. That will change the distance between the text blocks that you have separated by empty lines, but natually also the distance between lines in a text block.

For completeness: Text blocks in HTML is usually done using the p tag around text blocks. That way you can control the line height inside the p tag, and also the spacing between the p tags.

Comment

how to reduce or increase br tag height in css

br { content: ""; display: block; margin: 1rem 0; }
br::after { content: "› "; /* content: " " space ignored */; float: left; margin-right: 0.5rem; }
Comment

PREVIOUS NEXT
Code Example
Css :: css selected color 
Css :: nth-child() css 
Css :: css grid auto resize on mobile 
Css :: sans serif font family css 
Css :: make an image smaller css 
Css :: css html unterstreichen 
Css :: html5 video hide timeline 
Css :: css first h element 
Css :: read properties from css file 
Css :: easiest way to invert css to dark mode 
Css :: image resize css 
Css :: padding shorthand 
Css :: transition background gradient 
Css :: not hover css 
Css :: css border hover 
Css :: loops scss 
Css :: postcss-preset-env: end value has mixed support, consider using flex-end instead 
Css :: how to change height font css 
Css :: tailwind center vertically 
Css :: no hover effect css 
Css :: add more than 2 css jquery 
Css :: footer at bottom of body 
Css :: css blink animation 
Css :: css animate border 
Css :: how to add font otf format in html 
Css :: z index div over cursor 
Css :: datatables width 100% not working 
Css :: center ul 
Css :: most common media query sizes 
Css :: css using the same background-color as the parent background 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =