Post by ranilwallace on Jul 15, 2015 3:36:38 GMT 10
Hi everyone. I am not really a fan of hmtl and css but this time I need it! I want to create a simple duckduckgo search page in html. Here is the search bar and I want it in the centre of the page. <iframe src="https://duckduckgo.com/search.html?width=600&duck=yes&prefill=Search DuckDuckGo " style="overflow:hidden;margin:0;padding:0;width:733px;height:60px;" frameborder="0"></iframe>
Ranil, Lauve Tech
|
|
Post by efwwww on Jul 15, 2015 5:59:23 GMT 10
Do you want it in the center middle or center top?
Center-Top:
<body> <div id="center" style="display: table; margin: 0 auto;"> <iframe frameborder="0" src= "https://duckduckgo.com/search.html?width=600&duck=yes&prefill=Search%20DuckDuckGo" style= "overflow:hidden;margin:0;padding:0;width:733px; height:60px;"></iframe> </div> </body>
|
|
Post by Nathan Lecompte on Jul 15, 2015 12:47:17 GMT 10
Is it a widget provided by DuckDuckGo or do you want to make your own search bar?
|
|
Post by ranilwallace on Jul 15, 2015 13:29:19 GMT 10
I want it centre middle and its a widget
Ranil, Lauve Tech
|
|
Post by ranilwallace on Jul 15, 2015 13:32:16 GMT 10
efwwww it is at the centre top now but how to do i place it centre middle?
Ranil, Lauve Tech
|
|
Post by efwwww on Jul 15, 2015 13:49:04 GMT 10
ranilwallaceThis should work: <body> <div id="center" style=" top: 50%;left: 50%;margin-top: -50px; margin-left: -350px;position: fixed;"> <iframe frameborder="0" src="https://duckduckgo.com/search.html?width=600&duck=yes&prefill=Search%20DuckDuckGo" style="overflow:hidden;margin:0;padding:0;width:733px; height:60px;"></iframe> </div> </body>
|
|
Post by ranilwallace on Jul 15, 2015 13:50:47 GMT 10
Yes!!! it did! thanks so much
Ranil, Lauve Tech
|
|
Post by efwwww on Jul 16, 2015 0:05:42 GMT 10
No problem.
|
|