Friday 15 May 2015

css - How do I create a Zomato style search bar? -



css - How do I create a Zomato style search bar? -

i want crate search bar similar of https://www.zomato.com/ same layout.

i able create floating search box on top of background image. not sure how bring together various input fields , button side side. css have of now.

.search { background:rgba(0,0,0,0.6); border: 2px solid #414141; border-radius: 5px; padding: 10px; } header { text-align: center; color: #fff; background-attachment: scroll; background-image: url(../img/header-bg.jpg); background-position: center center; background-repeat: none; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; -o-background-size: cover; } header .intro-text { padding-top: 100px; padding-bottom: 50px; } header .intro-text .intro-lead-in { margin-bottom: 25px; font-family: "droid serif","helvetica neue",helvetica,arial,sans-serif; font-size: 22px; font-style: italic; line-height: 22px; }

as html:

<body id="page-top" class="index"> <!-- have navbar here --> <!-- header --> <header> <div class="intro-text"> <div class="intro-lead-in">welcome our studio!</div> <div class="intro-heading">it's nice meet you</div> </div> </header> </body>

this fiddle containes style of bar. think may help you.main involvement css is:

.header-link { float: left; height: 60px; margin: 0px 7px auto 0px; } .header-link { line-height: 62px; color:#fff; } .header-hiring-btn { background-color: #cb202d; padding: 7px 8px 6px; border-radius: 3px; text-align: center; color: #fff !important; transition: 0.15s ease-out 0s; margin-right: 6px; }

class="snippet-code-css lang-css prettyprint-override">.header { box-sizing: border-box; height: 60px; position: absolute; width: 100%; z-index: 7; background: none repeat scroll 0% 0% rgba(45, 45, 45, 0.8) !important; color:#fff; } .wrapper { padding-left: 10px; padding-right: 10px; margin-right: auto; margin-left: auto; box-sizing: border-box; max-width: 1140px; } .col-s-16 { width: 100%; box-sizing: border-box; } .logo-header { width: 134px; } .logo { display: inline-block; float: left; text-align: center; height:46px; } .logo img { width: 130px; margin-top: 15px; margin-left: -4px; vertical-align: middle; border: 0px none; } .header-navigation { float: right; display: inline-block; height: 60px; } .login-navigation { float: left; } .header-link { float: left; height: 60px; margin: 0px 7px auto 0px; } .header-link { line-height: 62px; color:#fff; } .header-hiring-btn { background-color: #cb202d; padding: 7px 8px 6px; border-radius: 3px; text-align: center; color: #fff !important; transition: 0.15s ease-out 0s; margin-right: 6px; } class="snippet-code-html lang-html prettyprint-override"><header class="header header--fixed " id="header"> <div class="wrapper"> <div class=""> <div class="col-s-16"> <a class="logo logo--header" href="https://www.zomato.com" title=""> <img src="https://bzmtcdn-a.akamaihd.net/images/logo/zlogo.png" alt=""> </a> <section class="header-navigation" id="header-navigation"> <section class="login-navigation" id="login-navigation"> <div class="header-link"> <a class="header-hiring-btn" href="https://www.zomato.com/careers" target="_blank">we&#039;re hiring!</a> </div> <span class="header-link"> <a href="#" class="facebook-login header-login-button" data-reload="true">log in facebook</a> </span> <span class="header-link mr0"> <a href="#" id="signin-link">log in</a> </span> </section> </section> <!-- end header-navigation --> </div> <!-- end col-s-16 --> </div> <!-- end row --> </div> <!-- end wrapping class --> </header>

the code seems based on bootstrap.css rebuild. hope helps.

css css3

No comments:

Post a Comment