Twitter-Bootstrap - put simple elements inline

94,089

Anchor tags by default should be displayed inline. You must have some extra styling setting them to display as block elements or something similar.

Using your code, here is a working JSFiddle.

Inspect your page to find out where the anchor's display is being set and either modify that or set the element to display:inline after that. As you've already added class="inline" you can simply just add:

a { display:block; /* Pre-existing code */ }
a.inline {
    display:inline;
}

Also as a note I don't think row-fluid is designed to work without Bootstrap's other scaffolding elements, if you want a full-width row you should use:

<div class="row-fluid">
    <div class="span12">
        <a class="inline">jjj</a>
        <a class="inline">sss</a>
    </div>
</div>
Share:
94,089

Related videos on Youtube

itsme
Author by

itsme

JS

Updated on May 20, 2020

Comments

  • itsme
    itsme about 4 years

    Is there anyway to put 2 <a> elements displaying inline?

    i tryed :

    <div class="form-inline">
    <a>jjj</a>
    <a>sss</a>
    </div>
    

    and also

     <div class="row-fluid">
        <a class="inline">jjj</a>
        <a class="inline">sss</a>
        </div>
    

    but it doesn't work.

  • itsme
    itsme over 11 years
    yes you are right, it was a css problem on my own stylesheet, thank you very much i'll accept your answer
  • kaleemsagard
    kaleemsagard over 9 years
    But, what about twitter bootstrap?
  • FlyingNimbus
    FlyingNimbus over 8 years
    In this context, Bootstrap and Twitter Bootstrap are the same thing.
  • obinoob
    obinoob over 6 years
    This does not work, you can't put two elements inline that overflow the parent element. Perhaps you might want to insert more characters....