2 Replies - 483 Views - Last Post: 10 February 2013 - 09:26 PM

#1 qadeerhussain007  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 35
  • Joined: 05-July 12

converting a div element into a inline element

Posted 10 February 2013 - 10:21 AM

friends i have a two div element
    <div id="one" >
<ul>
<li> one</li>
<li> two </li>
</ul>
</div>        

    <div id="two" >
<ul>
<li> three</li>
<li> four </li>
</ul>
</div>        

how to inline both div elements im using display:inline but its not working

Is This A Good Question/Topic? 0
  • +

Replies To: converting a div element into a inline element

#2 amit.soni  Icon User is offline

  • D.I.C Head

Reputation: 26
  • View blog
  • Posts: 73
  • Joined: 19-November 10

Re: converting a div element into a inline element

Posted 10 February 2013 - 12:07 PM

have you tried

div
{
  display:inline-block;
}



check this Fiddle

This post has been edited by amit.soni: 10 February 2013 - 10:10 PM

Was This Post Helpful? 0
  • +
  • -

#3 FerretHolmes  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 41
  • View blog
  • Posts: 167
  • Joined: 12-November 12

Re: converting a div element into a inline element

Posted 10 February 2013 - 09:26 PM

If you are looking to align the div's together inline, then you need to use float. Inline-block will align the ul and li elements, but not the div's themselves.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1