Can't center or add top margin to webpage

DaveFL

New Member
I recently created a new webpage but I'm having problems trying to center it vertically. I'm really new to html and css so I was hoping someone might be able to explain to me in layman terms how to edit my html to either get my page to center vertically or at least how to add a top margin so the page isn't stuck right up against the top of the screen. I tried changing the top margin value from 0 to something else, but it didn't work. Here is my current html:

<html>
<head>
<title>Webpage Home 3</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Webpage Home 3.psd) -->
<a href="http://website.com/portfolio.pdf">
<img src="images/index.jpg" width="1000" height="768" border="0" alt=""></a>
<!-- End ImageReady Slices -->
</body>
</html>


Any help with this would be much appreciated.
 

chrishirst

Well-Known Member
Staff member
HTML:
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
Why are you using HTML code that was deprecated in 1999???
 

GUDVH

New Member
<body>
<br><br>... before your first content, as many times as you like to lower the page! It's the simplest ways :)
 

d a v e

New Member
<body>
<br><br>... before your first content, as many times as you like to lower the page! It's the simplest ways :)
'

assuming everyone has the same size "page" as you - inluding those with the same text size, browser size, screen size - kind of doubtful if you have those on a mobile phone or tablet up to those with a maximised browser on say a 27" screen of 1600px wide or more :)
 

chrishirst

Well-Known Member
Staff member
<body>
<br><br>... before your first content, as many times as you like to lower the page! It's the simplest ways :)

Oh Please!!!! May I suggest that you do NOT give up your day job to become a web developer!!
 

ronaldroe

Super Moderator
Staff member
HTML:
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
Why are you using HTML code that was deprecated in 1999???

Because he's using a technology that was created in 2002 that was out of date when it was released.
 

leroy30

New Member
http://www.qrcodegenerator.co.nz/ > F12 [Developer Tools] > Clickety click

No, I'm not spamming lol. Yes, this is one of my websites.

It's centered vertically. Just use developer tools to see how. Can't really be arsed explainin it when it's already a google search away.
 
Top