Jump to content
Sign in to follow this  
MarkT

CSS problems - Display

Recommended Posts

Hello,I'm experiencing a few problems with my CSS.i currently have;#search { width: 300px;height: auto;color: #FFF;margin-left: 30px;display: inline-block;}#bar {margin-left: -15px;margin-right: -15px;margin-top: -12px;width: 110%;height: 50px;background-color: #000;position: fixed;border-radius: 3px;padding-left: 15px;padding-right: 15px;padding-top: 12px;}#title {width: 200px;height: auto;margin-top: -10px;margin-left: 20px;background-color:#000;opacity: 0.5;border-radius: 2px;color: #FFF;} and HTML wise;<div id="bar"><div id="title"><h1 color="#FFF">PitchIT</h1></div><div id="search">Search Here</div></div> However,I get the 'PitchIT' text on the line,and the 'Search here' is on the line below, despite my display: inline; Any help?

Share this post


Link to post
Share on other sites

Give the h1 tag a float: left; You will need to make adjustments to the alignment but that will get your 'search' on the same line.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...