Take a Half Line Break <br>

If I want to remove the space between the lines of these two elements, how would I do it. Example:

Example 1 http://pokit.org/get/img/6be8921b47ff746c1bf297cf87ab0950.jpg

If I remove <br> , it will be like this: this is how it looks:

Example 2 http://pokit.org/get/img/1924cb8a9b344bb4f4eda1a98760fd3e.jpg

Lines should close each other. I wonder how I can make a half tag <br> . If you understand my question?

The space between the two lines should be less than in example 1. but higher than in example 2.

This code is used

  <span class="tekst">Sie besuchten Düsseldorf als:</span><br> <select name="posjeta" class="optiontekst"> <option>- bitte wählen -</option> <option>Geschäftsreisende</option> <option>Privatperson</option> </select> <br><br> 

And class tekst

 .tekst{ font-family: 'Bree Serif', serif; color: #2980b9; } 

I know that I didn’t explain very well, but I tried my best.

+7
html css
source share
6 answers

The <br> tag simply adds a line break to the document in a standard line break. You can adjust the size of the <br> element in CSS:

  br { line-height: 10px; } 

Or you can use the trick with <hr> ; setting the height and making it invisible

 <hr style="height:10px; visibility:hidden;" /> 
+12
source share

If you want to do this in only one place, you can apply linear height directly to the element
like: <br style="line-height: 10px" />

+3
source share

You can use the fields:

Demo

HTML:

  <span class="tekst">Sie besuchten Düsseldorf als:</span> <select name="posjeta" class="optiontekst"> <option>- bitte wählen -</option> <option>Geschäftsreisende</option> <option>Privatperson</option> </select> <br> <br> 

CSS:

 .tekst { font-family:'Bree Serif', serif; color: #2980b9; display:block; margin-bottom:10px; /* adapt the margin value to the desire space between span and select box */ } 
+2
source share

Several variants:

  • add margin-bottom or padding-bottom to the element on top
  • add margin-top to the selection

There are probably many other possibilities to achieve this.

+1
source share

HTML:

 <span class="tekst">Sie besuchten Düsseldorf als:</span> <select name="posjeta" class="optiontekst"> <option>- bitte wählen -</option> <option>Geschäftsreisende</option> <option>Privatperson</option> </select> <br><br> 

CSS:

 .tekst{ font-family: 'Bree Serif', serif; color: #2980b9; margin-bottom: 10px; padding-bottom: 10px; } 

Try this code, it will work for you.

0
source share

add span-bottom span element

OR

add margin-top element to select element

For example:

 tekst { margin-bottom: 10px; } 

OR

 optiontekst { margin-top: 10px; } 
0
source share

All Articles