html - positioning a div right and left simultaneously -
i'm trying make div have width using absolute positioning , work fine in google chrome in fierfox doesnt. why there conflict ? tried exact same code in both browser , on fierfox doesnt reconize it.
<!doctype html> <html > <head> <meta charset="utf-8"/> <title>kelma</title> <link rel="stylesheet" href="style.css" /> </head> <body> <input type="text" id="center" /> </body> </html>
and css file
#center{ position: absolute; left:50px; right: 50px; }
take @ this:
<!doctype html> <html > <head> <meta charset="utf-8"/> <title>kelma</title> <link rel="stylesheet" href="style.css" /> <style> #wrapper { position: absolute; left:50px; right: 50px; } #center { width:100%; } </style> </head> <body> <div id="wrapper"> <input type="text" id="center" value="test" /> </div> </body> </html>
i wrapper input div, , applied styling div, , 100% width input.
Comments
Post a Comment