MarkT Posted May 29, 2013 Share Posted May 29, 2013 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? Link to comment Share on other sites More sharing options...
newseed Posted May 29, 2013 Share Posted May 29, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now