1

I'm trying to get the site text right next to site-title. My code right know is

<p>

<block><div style="background-color:#993383; color:#ffffff; font-style: normal; ">
<span class="nowrap"><h3 id="site-title"><b>TEXT GOES HERE</b></h3></span> <span class="nowrap"><h5 id="site-text"> TEXT GOES HERE</h5></span>
     </div></block>
    </p>

Im not sure if the code class="nowrap" is correct, so i'm hoping you can help me out!

  • 2
    and the code for the nowrap css? – chillworld Mar 02 '14 at 10:44
  • 1
    Why not just using display:inline for the h3 elements? –  Mar 02 '14 at 10:46
  • You should remove bogus markup like `` as well as markup and styling that irrelevant to the problem at hand (like color settings here) and, most importantly, include the *relevant* code. – Jukka K. Korpela Mar 02 '14 at 11:14
  • 1
    what i understand you are trying to make them in one line by placing 'block level' element inside, 'inline'. Which not right way to do. block level element is always block whether you place it inside inline element or not. you can fix it - check my answer – Aamir Shahzad Mar 02 '14 at 12:15

1 Answers1

0

I am not sure whats inside your .nowrap class. You can make text side by side in many ways like,

.nowrap
{
   display: inline-block;
}

fiddle

if you are wondering why? text is occupying two lines not one. The reason is h3 is a block level element so it breaks the line. In order to show them side by side Via CSS you can do by adding display: inline-block.

Are H1,H2,H3,H4 tags block or inline elements?

Community
  • 1
  • 1
Aamir Shahzad
  • 6,683
  • 8
  • 47
  • 70