Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Member #
    36952

    Can't center or add top margin to webpage

    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.

  2.  

  3. #2
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Your code has a number of errors (not the least of which is that it seems like you're using Adobe ImageReady).

    Inline styling is not often a good idea, but if you are going to use it, do some searches and learn how to write it correctly, like this :

    <body style=" background:#FFFFFF; margin-top:0; margin-left:0;">

    There is no such thing as marginheight or marginwidth, where did you get those from?

    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!

  4. #3
    Junior Member
    Join Date
    Aug 2013
    Posts
    3
    Member #
    36952
    That is the exact html file created from Adobe Photoshop CS2. You're right, I need to learn how to write it myself, but I'm in a major time crunch and looking for help.

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Quote Originally Posted by AlphaMare View Post
    There is no such thing as marginheight or marginwidth, where did you get those from?
    HTML <= 3
    Sad to say, this is where I started out, except I was writing it by hand that way.

    Quote Originally Posted by FLman View Post
    That is the exact html file created from Adobe Photoshop CS2. You're right, I need to learn how to write it myself, but I'm in a major time crunch and looking for help.
    What Mare wrote up there for you should do the trick if you replace what you have with it.
    I know you're in a time crunch, but you should know that any and all text on that page will be completely hidden from search engines, because your website is one huge image. It really wouldn't take very long for someone who knows what they're doing to code it out for you.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:41 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com