Evitar quebra de linha, neste caso,
-
13-12-2019 - |
Pergunta
Eu estou tentando evitar a quebra de linha em Html
Acontece que quando eu redimensionar minha janela, ícones e texto quebrar em nova linha.Eu já tentei com espaço em branco de propriedade CSS.Eu tentei também, uma tabela de abordagem, mas o comportamento é o mesmo
Alguém pode descobrir o que está acontecendo?
Obrigado antecipadamente
Solução
tente isso:
.line {
height: 44px;
width: 100%;
display: inline-block;
background-color: #6c7987;
white-space: nowrap;
position: relative;
}
.icon {
position: absolute;
left: 0;
height: 44px;
width: 90px;
background-color:
#FF0080;
color: white;
text-align: center;
line-height: 44px;
font-family: Arial;
float: left;
font-size: 12px;
font-weight: bold;
padding: 0;
}
.title {
position: absolute;
left: 90px;
color: white;
line-height: 44px;
text-align: left;
padding: 0 0 0 10px;
font-family: Arial;
float: left;
font-size: 12px;
display: inline;
white-space:nowrap;
}
.botoes {
position: absolute;
width: 300px;
right: 0
}
.botao {
width: 46px;
height: 45px;
float: right;
line-height: 44px;
text-align: center;
display: block;
white-space:nowrap;
cursor: pointer;
}
.botaoVerRecurso {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoVerRecurso:hover {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoEditarRecurso {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoEditarRecurso:hover {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoFavRecurso {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoFavRecurso:hover {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoPartRecurso {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoPartRecurso:hover {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoApagarRecurso {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.botaoApagarRecurso:hover {
background: url('http://www.think-cell.com/images/cross.png') center no-repeat;
}
.clear {
clear: both;
}
A explicação é simples:com flutuante, você não pode colocar mais largura de um titular, o qual é maior do que o de titular de altura, a bóia será automaticamente cai, e quebras de linha.
Se você usar posições, usá-lo assim:
RECIPIENTE (posição:relativo)
Subelemento (posision:absoluto, superior:0, esquerda:0) < colocar na parte superior esquerda
Subelemento (posision:absoluto, inferior:0, para a direita:0) < colocar no canto inferior direito
Outras dicas
Se eu entendo o seu problema correcly, você precisa ser capaz de redimensionar a largura da janela, sem ter o texto e o "x" ícones pulando para baixo, é assim:
REMOVER CSS DO .title
min-width: 500px;
Veja isso Violino Exemplo!