Solved

restyle google custom search box appearance in HTML

Posted on 2014-10-28
2
564 Views
Last Modified: 2014-10-28
I am looking for help in restyling the appearance of the Google Custom Search Engine search box.  I want to change the Search box shape and transparency in HTML/CSS.
0
Comment
Question by:eanmd
2 Comments
 
LVL 17

Accepted Solution

by:
selvol earned 500 total points
ID: 40407851
Add this to your page after the search box code..   Change the number values to suite your needs.

The class name is .gsc-search-box

This part " !important" is important.

<style type="text/css">
.gsc-search-box {border: 2px solid !important;
    border-radius: 25px !important;
    opacity: 0.5 !important;

}</style>

Open in new window



Selvol
Here some more of the css.

 input.gsc-search-button { margin-left : 2px; } div.gsc-clear-button { display : inline; text-align : right; margin-left : 4px; margin-right : 4px; padding-left : 10px; background-repeat: no-repeat; background-position: center center; background-image: url('//www.google.com/uds/css/clear.gif'); cursor : pointer; } .gsc-search-box-tools .gsc-clear-button { display: none; } .gsc-results-close-btn { background-image: url("//www.google.com/images/nav_logo114.png"); background-repeat: no-repeat; background-position: -140px -230px; float: right; display: none; opacity: 0; height: 12px; width: 12px; position: absolute !important; top: 20px; right: 20px; cursor: pointer; }

Open in new window


Here's a link to some of the css used.

https://github.com/dvidsilva/memegusta1/blob/master/template/search.html
0
 

Author Closing Comment

by:eanmd
ID: 40409332
Great Solution - Exactly what I needed - Thanks for the Help ! :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now