HTML question

This is a discussion on HTML question within the Tech Board forums, part of the Community Boards category; I really don't know why the text "Welcome to my website" is not displaying at center of my webpage in ...

  1. #1
    Dave18
    Guest

    HTML question

    I really don't know why the text "Welcome to my website" is not
    displaying at center of my webpage in MS brower. But it displays
    OK at the center of the webpage in Netscape.
    Can anyone help to fix it. Thank you very much!

    Code:
    <HTML>
    <HEAD>
    
    <style>
      body { background:silver; font-family:Arrus BT,Garamond,Times New Roman; }
      div { position:absolute; }
    </style>
    
    <TITLE>My homepage</TITLE></HEAD>
    
    <BODY>
    <style>
      .shade1 { top:+5; left:+5; color:gray; }
      .fill1 { top:0; left:0; color:blue; }
    </style>
     <div class=Example1>
         <div class="shade1">
         <center><h1>Welcome to my website</h1></center>
         </div>
         <div class="fill1">
         <center><h1>Welcome to my website</h1></center>
         </div>
    
     </div>
    
    </BODY>
    </HTML>

  2. #2
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    i've never used the <div> </Div> b4 mebe its that?

  3. #3
    Registered User PostCode's Avatar
    Join Date
    Jan 2002
    Posts
    12
    Try using:

    Code:
    <div align="center">
    
    code between the tags here
    
    </div>

  4. #4
    Not-Registerd
    Guest
    <div style={align:"center">
    <!--Stuff in here--!>
    </div>

  5. #5
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >div { position:absolute;}
    >.shade1 { top:+5; left:+5; color:gray; }
    Looks like you are telling it where to go?

    But then I found this. I tried their sample code on IE6 latest version and the box was left aligned, but on Mozilla it was central.

    Hope this helps.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  6. #6
    Registered User codingmaster's Avatar
    Join Date
    Sep 2002
    Posts
    309
    Another tag is <center>, but it was developed by Microsoft for the Internet Explorer and is not a standard of HTML 4.01

    Go to:

    www.w3c.org
    Last edited by codingmaster; 09-28-2002 at 08:58 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Design layer question
    By mdoland in forum C# Programming
    Replies: 0
    Last Post: 10-19-2007, 05:22 AM
  2. Exam Question - Possible Mistake?
    By Richie T in forum C++ Programming
    Replies: 15
    Last Post: 05-08-2006, 04:44 PM
  3. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM
  4. Design + HTML
    By orbitz in forum C Programming
    Replies: 8
    Last Post: 11-21-2002, 06:32 AM
  5. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21