Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
157
rated 0 times [  162] [ 5]  / answers: 1 / hits: 21516  / 12 Years ago, thu, november 29, 2012, 12:00:00

Possible Duplicate:

Best way to center a <div> on a page vertically and horizontally?






How can my result is displayed in the middle of page with the help of Html or javascript code. As you all have seen google in search page. I get my result in top center but I want in the middle like google page.
My Html code is:



<html>
<head>
<title> Search</title>
<body>

<center>Search: <input type=Text Name=>
<input type=Submit value=Go></center>

</body>
</html

More From » php

 Answers
38
<html>
<head></head>
<body style=width: 100%; height: 100%;>

<div style=top: 50%; left: 50%; position: absolute;>
<div>Centered text</div>
</div>

</body>
</html>

[#81718] Wednesday, November 28, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
katharinek

Total Points: 302
Total Questions: 105
Total Answers: 123

Location: Austria
Member since Thu, Jan 7, 2021
3 Years ago
;