Text inside a div positioned with flex linebreaks before and after certain tags

后端 未结 2 1232
-上瘾入骨i
-上瘾入骨i 2020-12-22 02:48

I have been searching around, but for the life of me I cannot figure out what\'s going on. My text is getting wrapped at certain tags, while I want it all on one line.

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-22 03:41

    Why it break line is because of the display: flex; flex-direction: column on the pagetitleleft/center/right elements, which make the span a flex column item and take 100% width.

    By dropping the display: flex on the pagetitleleft/center/right elements and set align-items: center to their parent, their text will center vertically

    .pagetitlewrapper {
    	width: 99%;
    	background-color: #c1dbff;
    	border-radius: 25px 25px 0px 0px;
    	padding: 10px;
    	display: flex;
    	align-items: center;
    }
    
    .pagetitleleft,.pagetitlecenter,.pagetitleright {
    	width: 33%;
    }
    
    .pagetitleleft {
    	text-align: left;
    	font-size: 9;
    }
    
    .pagetitlecenter {
      text-align: center;
    }
    
    .pagetitleright {
    	text-align: right;
    	font-size: 9;
    	resize: vertical;
    }
    Welkom, FNAME LNAME

    Nexus Consult DMS

    Licensed to DON'T WRAP - License valid until xx/xx/xxxx.

提交回复
热议问题