← HTML + CSS

evitar quebra de linha na tag <span>

Lida 10929 vezes

Offline

Hash 
Membro
Mensagens 7 Gostos 0
Troféus totais: 16
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 3 Level 2 Level 1 First Post Karma Eighth year Anniversary Seventh year Anniversary

olá

gosta de saber, se existe alguma maneira que evite a quebra de linha
quando insiro dois <span> seguidos.

género: <span>ola</span><span>ola</span>

o output disto fica:

ola
ola

Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Normalmente não devia de acontecer isso!

Não tens nada em algum .css a fazer a quebra de linha?
Offline

felipeantunes 
Membro
Mensagens 66 Gostos 0
Troféus totais: 23
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Poll Voter Level 4 Level 3 Level 2 Level 1 50 Posts 10 Posts

<span> é display inline, impossivel dar quebra de linha. o codigo deve ter um display block perdido, veja usando o firebug
Offline

Hash 
Membro
Mensagens 7 Gostos 0
Troféus totais: 16
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 3 Level 2 Level 1 First Post Karma Eighth year Anniversary Seventh year Anniversary

apenas chamo uma classe a minha table.
mas ja comentei a chamada da classe e continua a quebra na mesma...


//css
.table {
  margin: 0;
  padding: 0;
width:auto;
margin-top:5px;
margin-bottom:5px;
border-collapse: collapse;
      font-family: "Arial";
}

   .table_header td {
      padding: 5px 10px;
      color: #FF6600;
      border-top: 0px solid #CBD6DE;
      border-bottom: 0px solid #ADBECB;
      font-size: 1.1em;
      font-weight: bold;
   }
   .table_header td a:link, .table_header td a:visited {
      text-decoration: underline;
      color: rgb(70,122,167);
   }
   .table_header td a:hover {
      text-decoration: underline;
      color: #73A822;
   }
   .table_header td {
      border: 0px solid #CBD6DE;
   }



//html

<table class="table" border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr><td align="left" NOWRAP>
       <span id="1">1</span>
       <span id="2">2</span>
</td></tr>
</table>
Offline

Hash 
Membro
Mensagens 7 Gostos 0
Troféus totais: 16
Trófeus: (Ver todos)
Super Combination Combination Topic Starter Level 3 Level 2 Level 1 First Post Karma Eighth year Anniversary Seventh year Anniversary

ok
...era mesmo por causa do <span style="display:block;">
estava a forçar o estilo, já que é sempre visível se apenas criar a tag.

muito obrigado, pela ajuda!