What is the code to center a layout and make it touching the top of the screen? i have forgotten
What is the code to center a layout and make it touching the top of the screen? i have forgotten
Ummm its css.. one sec
I think thats its..Code:<html> <head> <style type="text/css"> body { margin-top: 0px; } </style> </head> <body> </body> </html>
nope, thats not it
hmm.... idk off the top of my head.. im half asleep anyway.. and .. I just got back on this account.. so... ill find out soon! let me look in my code library
That aligns it all the way in the left..Code:<style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style>
Last edited by Dentafrice1; 03-12-2006 at 12:51 AM.
For some reason it doesnt goto the very top but it should do for me, thanks Dent
I dont think CSS can go into the minus range.. you could try -1 as one of those.. could you give me the link to the page your doing it on?
Kevin
Although I haven't used this try:
HTML Code:<style type="text/css"> <!-- * { margin: 0px; padding: 0px; } body { margin-top: 100%; margin-bottom: 100%; } </style>
Last edited by Net-Margin; 03-12-2006 at 01:33 AM.
Hmm.. That was what I was missing. padding.. but.. Hmm.. Idk.. maybe:
Code:<style type="text/css"> <!-- body { padding: 0px; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style>
He wants the layout to be centered.. not the text. And he wants no margins and no padding.. soo hmm. I think mine would work.
Want to hide these adverts? Register an account for free!