Md. Nazmul Hoque

You can find me

Worked in Rhone Poulenc Rorer, Fisons Bangladesh Ltd and Sanof-aventis.

Working as a System Engineer in NIK,Japan

Google Custom Search create a huge blank space at the bottom

Hoque

While working with Google Custom Search (Iframe supported) , it creates a huge blank space at the bottom? How can I avoid that blank space.

For example: this site [ http://www.town.togitsu.nagasaki.jp/search/pub/Default.aspx?c_id=2&q=togitsu&cx=000096980916426724425:keok8sbpuem&cof=FORID:10&ie=UTF-8 ] creates a huge blank space at the bottom.

I have checked the source (http://www.google.com/afsonline/show_afs_search.js) but could not get it out.

Read more

Published: 5/17/2012 11:01:56 PM

Answer by Hoque for Get Element From iFrame Returns Null/undefined?

Hoque

Try this example

<html>
<head>
    <title>Iframe Test</title>
    <script type="text/javascript">
    window.onload= function(){
        var frame=document.getElementsByTagName("iframe")[0]; 
        var innerDoc = (frame.contentDocument)  ? frame.contentDocument  : frame.contentWindow.document; 
        alert(innerDoc.getElementById("input")); 
    }
    </script>

</head>
<body>
    <div>
        <iframe src="test.htm" />
    </div>
</body>
</html>

And the source of test.htm

<html>
<head>
    <title>A test Page</title>
</head>
<body>
    <div id="input">
    </div>
</body>
</html>

It worked in my local machine.

Read more

Published: 5/14/2012 5:46:01 PM

Answer by Hoque for displaying <li> horizontally with lesscss

Hoque


Demo : http://plugins.amiwithyou.com/lesscss/demo.htm


As per the documentation, you need to Link your .less stylesheets with the rel set to “stylesheet/less”:

<link rel="stylesheet/less" type="text/css" href="styles.less">

Then download less.js from the top of the page, and include it in the element of your page, like so:

<script src="less.js" type="text/javascript"></script>

Make sure you include your stylesheets before the script.

And then add the following in your styles.less file

 @darkGrey:#777;
 @mainColor:#333;
 ul{             
     width:100%;             
     padding: 0;             
     margin: 0;              
     li{             
         list-style-type: none;             
         padding-left: 10px;             
         display: inline;             
         white-space: nowrap;                  
             a{                     
             text-decoration: none;                     
             font-size: 16px;                     
             letter-spacing: -1px;                     
             color: @darkGrey;                     
             padding-right: 6px;                      
                &:hover{                         
                 color: @mainColor;                     
                }                 
            }             
        }
} 

Please note that,

  • I have removed float:left

and

  • added "}" at the end

Read more

Published: 5/9/2012 6:12:04 PM