BrettHartel Posted December 13, 2012 Share Posted December 13, 2012 When I try to move the <div> with top:0px; or left:0px; or try using top:20%; or left:20%; nothing is happening to my <div>. It is not even being fixed. It just gets lined in a row with the rest of the code. What am I doing wrong? My file is menu.php <?php header("Content-type: text/css; charset: UTF-8;"); $ColorMain1="#227D4C"; $ColorMain1Dark="#092315"; $ColorMain2="#7D2252"; $ColorMain2Dark="#220916"; ?> <div id="mainpagewidth" style="position:fixed;left:0px;top:0px;width:1024px;background-color:#000000;"> Hello <?php if (isset($_COOKIE[user_ID])) echo "Welcome " . $_COOKIE[user_ID] . "!<br>"; else { ?> <div id="newuser" style="position:fixed;left:20px;background-color:#FEEC65;width:540px;"> <table border="4px" bordercolor="#220916" width="540px"><tr><td width="50%"> <div style="background-color:#220916;height:1px;width:100%x;font-size:1px;"></div> <div style="font-size:25PX;text-align:center;background-color:#227d4c;color:#220916">Log-In</div> <div style="background-color:#220916;height:1px;width:100%;font-size:1px;"></div><br /> <form action="login.php" method="post"> <div style="text-align:right;line-height:25px;">e-Mail: <input type="text" name="eMail" style="width=152px;"> <br /> Password: <input type="password" name="Password" style="width=152px;"> <br /><br /> <input type="submit" value="Log In"> <br /></div> </td><td width="50%"><br /> <div style="text-align:center;"><font style="font-size:25px;">Sign Up</font><br /> <font style="font-size:50px;">It's FREE!</font></div> <div style="text-align:right;line-height:25px;"><form action="signup.php" method="post"><br /> e-Mail: <input type="text" name="eMail" style="width=152px;"> <br /> First Name: <input type="text" name="FirstName" style="width=152px;"> <br /> Last Name: <input type="text" name="LastName" style="width=152px;"> <br /> Password: <input type="password" name="Password" style="width=152px;"> <br /> <input type="radio" name="Gender" value="male">Male <input type="radio" name="Gender" value="female">Female <br /> Birthday: <select name="Month"> <option value="1" selected="selected">Jan</option> <option value="2">Feb</option> <option value="3">Mar</option> <option value="4">Apr</option> <option value="5">May</option> <option value="6">Jun</option> <option value="7">Jul</option> <option value="8">Aug</option> <option value="9">Sep</option> <option value="10">Oct</option> <option value="11">Nov</option> <option value="12">Dec</option> </select> <select name="Day"> <option value="1" selected="selected">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> </select> <input type="text" name="Year" size="4" maxlength="4" onkeypress='validate(event)' > <br /><br /> <input type="submit" value="Sign Up"> </form></div><br /> </td></tr></table> </div> <?php ;} ?> </div> <script> function validate(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9]|\./; if( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) theEvent.preventDefault(); } } </script> Link to comment https://forums.phpfreaks.com/topic/271944-php-with-css-div-positionfixed-not-working/ Share on other sites More sharing options...
BrettHartel Posted December 13, 2012 Author Share Posted December 13, 2012 I was missing this: <meta http-equiv="x-ua-compatible" content="ie=edge"/> Link to comment https://forums.phpfreaks.com/topic/271944-php-with-css-div-positionfixed-not-working/#findComment-1399105 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.