Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: HTML code to center my website  (Read 53833 times)

0 Members and 1 Guest are viewing this topic.

Solus Hospes

    Topic Starter


    Greenhorn

    HTML code to center my website
    « on: August 22, 2008, 11:44:34 PM »
    Hello,

    I'm a novice when it comes to web design and worse when it comes to HTML. My knowledge is rudimentary at best and completely self taught. For this particular problem I am using "freewebs" as the host for my domain name and have the website set up to my liking except one small issue. I am well aware people have different settings of resolution on different sized monitors and would like to have my website automatically center on their screen.  I have spent over three hours trying to find a sufficient code to do this with no success.

    I appreciate anyone's help.

    This is the full code for my "index" page of my website.
    Code: [Select]
    <html>
    <head>
    <body>
    <title>Vision of Gor | A players outlook</title>

    <DIV style="LEFT: 0px; BACKGROUND-IMAGE: url(http://www.freewebs.com/visionofgor/Background.jpg);
    WIDTH: 800px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 0px; HEIGHT: 550px">

    <div style="position:absolute; left:170; top:26;"><iframe src="http://www.visionofgor.com/updates.html"
    name="A" WIDTH="613" HEIGHT="92" frameborder="0" allowtransparency="true"></iframe></div>

    <div style="position:absolute; left:169; top:247;"><iframe src="http://www.visionofgor.com/00.html"
    name="Main" WIDTH="614" HEIGHT="285" frameborder="0" allowtransparency="true"></iframe></div>
     
    <DIV style="PADDING-RIGHT: 0px; OVERFLOW-Y: auto; PADDING-LEFT: 0px; SCROLLBAR-FACE-COLOR:
    #0000ff; FONT-SIZE: 8pt; Z-INDEX: 1; FILTER: chroma(color=#0000FF);
             LEFT: 0px; OVERFLOW-X: hidden; PADDING-BOTTOM: 0px;
             SCROLLBAR-HIGHLIGHT-COLOR: #0000ff;
    OVERFLOW: auto;
             WIDTH: 150px; SCROLLBAR-SHADOW-COLOR: #0000ff; SCROLLBAR-3DLIGHT-COLOR: #0000ff;
             SCROLLBAR-ARROW-COLOR: #A67D1B;
             PADDING-TOP: 10px;
    SCROLLBAR-TRACK-COLOR: #0000ff; FONT-FAMILY: Times New Roman; SCROLLBAR-DARKSHADOW-COLOR:
    #0000ff; SCROLLBAR-BASE-COLOR: #0000ff; POSITION: absolute;
             TOP: 266px;
             HEIGHT: 300px;
    TEXT-ALIGN: justify" allowTransparency>
                 <font size=2> <p align=center>
                 <font color="#000000">
     
    <a href="http://www.visionofgor.com/00.html" target="Main"> <font color="#ffffff"> <b> Intro</a>
    </b></font> <br><br>

    <a href="http://www.visionofgor.com/truthfact.html" target="Main"> <font color="#ffffff"> <b> Fact -vs-
    Truth</a> </b></font><br>
    <a href="http://www.visionofgor.com/bookvsaol.html" target="Main"> <font color="#ffffff"> <b> Book -vs-
    AOL</a> </b></font><br><br>

    <a href="http://www.visionofgor.com/RPcreed.html" target="Main"> <font color="#ffffff"> <b>RPer's
     Creed</a> </b></font><br><br>

    <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff"> <b>
    Reader's Comments</a> </b></font><br><br>

    <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff"> <b>
    Banners</a> </b></font><br><br>
     
    <a href="http://www.visionofgor.com/links.html" target="Main"> <font color="#FFffff"> <b> Links</a>
    </b></font><br><br>

    <a href="http://www.meoag.com/VoGcontact.html" target="Main"> <font color="#FFffff"> <b> Contact</a>
    </b></font>
     
    </font></DIV><DIV></DIV></DIV></BODY></head></HTML>


    Many thanks,
    Solus Hospes

    mcxeb52!

    • Guest
    Re: HTML code to center my website
    « Reply #1 on: August 22, 2008, 11:51:49 PM »
    http://www.webmasterworld.com/forum21/7567.htm

    That I think may be what you're looking for.

    Solus Hospes

      Topic Starter


      Greenhorn

      Re: HTML code to center my website
      « Reply #2 on: August 23, 2008, 12:10:16 AM »
      I appreciate the help and I have tried all three methods suggested to the best of my knowledge and still cannot get it to work. I am assuming that I am missing a fundamental code somewhere.

      Any suggestions?

      kpac

      • Web moderator
      • Moderator


      • Hacker

      • kpac®
      • Thanked: 184
        • Yes
        • Yes
        • Yes
      • Certifications: List
      • Computer: Specs
      • Experience: Expert
      • OS: Windows 7
      Re: HTML code to center my website
      « Reply #3 on: August 23, 2008, 03:31:42 AM »
      You have quite a few problems with the layout of your code.

      This is what you have:

      Code: [Select]
      <html>
      <head>
      <body>
      <title>Vision of Gor | A players outlook</title>

      <DIV style="LEFT: 0px; BACKGROUND-IMAGE: url(http://www.freewebs.com/visionofgor/Background.jpg);
      WIDTH: 800px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 0px; HEIGHT: 550px">

      <div style="position:absolute; left:170; top:26;"><iframe src="http://www.visionofgor.com/updates.html"
      name="A" WIDTH="613" HEIGHT="92" frameborder="0" allowtransparency="true"></iframe></div>

      <div style="position:absolute; left:169; top:247;"><iframe src="http://www.visionofgor.com/00.html"
      name="Main" WIDTH="614" HEIGHT="285" frameborder="0" allowtransparency="true"></iframe></div>
       
      <DIV style="PADDING-RIGHT: 0px; OVERFLOW-Y: auto; PADDING-LEFT: 0px; SCROLLBAR-FACE-COLOR:
      #0000ff; FONT-SIZE: 8pt; Z-INDEX: 1; FILTER: chroma(color=#0000FF);
               LEFT: 0px; OVERFLOW-X: hidden; PADDING-BOTTOM: 0px;
               SCROLLBAR-HIGHLIGHT-COLOR: #0000ff;
      OVERFLOW: auto;
               WIDTH: 150px; SCROLLBAR-SHADOW-COLOR: #0000ff; SCROLLBAR-3DLIGHT-COLOR: #0000ff;
               SCROLLBAR-ARROW-COLOR: #A67D1B;
               PADDING-TOP: 10px;
      SCROLLBAR-TRACK-COLOR: #0000ff; FONT-FAMILY: Times New Roman; SCROLLBAR-DARKSHADOW-COLOR:
      #0000ff; SCROLLBAR-BASE-COLOR: #0000ff; POSITION: absolute;
               TOP: 266px;
               HEIGHT: 300px;
      TEXT-ALIGN: justify" allowTransparency>
                   <font size=2> <p align=center>
                   <font color="#000000">
       
      <a href="http://www.visionofgor.com/00.html" target="Main"> <font color="#ffffff"> <b> Intro</a>
      </b></font> <br><br>

      <a href="http://www.visionofgor.com/truthfact.html" target="Main"> <font color="#ffffff"> <b> Fact -vs-
      Truth</a> </b></font><br>
      <a href="http://www.visionofgor.com/bookvsaol.html" target="Main"> <font color="#ffffff"> <b> Book -vs-
      AOL</a> </b></font><br><br>

      <a href="http://www.visionofgor.com/RPcreed.html" target="Main"> <font color="#ffffff"> <b>RPer's
       Creed</a> </b></font><br><br>

      <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff"> <b>
      Reader's Comments</a> </b></font><br><br>

      <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff"> <b>
      Banners</a> </b></font><br><br>
       
      <a href="http://www.visionofgor.com/links.html" target="Main"> <font color="#FFffff"> <b> Links</a>
      </b></font><br><br>

      <a href="http://www.meoag.com/VoGcontact.html" target="Main"> <font color="#FFffff"> <b> Contact</a>
      </b></font>
       
      </font></DIV><DIV></DIV></DIV></BODY></head></HTML>

      Try this:

      Code: [Select]
      <html>

      <head>
        <title>Vision of Gor | A players outlook</title>
      <head>

      <body>
        <center>
          <div align="center">
            <!-- All content you want to see on the page goes here -->
          </div>
        </center>
      </body>

      </html>

      That should dp you for now, and it should be centered on the page.  ;)

      For the future, all HTML tags and statements should be lower-case, and you should try laying out your code better.

      If you want to touch up on your knowledge, visit W3Schools for excellent tutorials on HTML and CSS.

      If you have any problems get back to me. I'll be right here. ;D

      Solus Hospes

        Topic Starter


        Greenhorn

        Re: HTML code to center my website
        « Reply #4 on: August 23, 2008, 10:00:24 AM »
        I feel like...worse than a novice. As stated previously, I'm self taught mostly through mimicking. Not the best way to learn, but it's worked for me so far. I appreciate your help Kpac, I really do.

        This is my "revised" code and I still cannot get the page centered. What am I missing?

        Code: [Select]
        <html>

        <head>
          <title>Vision of Gor | A players outlook</title>
        <head>

        <body>
          <center>
            <div align="center">
              <div style="left: 0px; background-image: url(http://www.freewebs.com/visionofgor/Background.jpg);
               width: 800px; background-repeat: no-repeat; position: absolute; top: 0px; height: 550px">

                <div style="position:absolute; left:170; top:26;"><iframe src="http://www.visionofgor.com/updates.html"
                 name="A" width="613" height="92" frameborder="0" allowtransparency="true"></iframe></div>

                <div style="position:absolute; left:169; top:247;"><iframe src="http://www.visionofgor.com/00.html"
                 name="main" width="614" height="285" frameborder="0" allowtransparency="true"></iframe></div>
         
                <div style="padding-right: 0px; overflow-y: auto; padding-left: 0px; scrollbar-face-color:
                 #0000ff; font-size: 8pt; z-index: 1; filter: chroma(color=#0000FF);
                 LEFT: 0px; overflow-X: hidden; padding-bottom: 0px;
                 scrollbar-highlight-color: #0000ff;
                 overflow: auto;
                 width: 150px; scrollbar-shadow-color: #0000ff; scrollbar-3dlight-color: #0000ff;
                 scrollbar-arrow-color: #a67d1b;
                 padding-top: 10px;
                  scrollbar-track-color: #0000ff; font-family: Times New Roman; scrollbar-darkshadow-color:
                  #0000ff; scrollbar-base-color: #0000ff; position: absolute;
                 top: 266px;
                 height: 300px;
                 text-align: justify" allowtransparency>
                     <font size=2> <p align=center>
                     <font color="#000000">
         
                  <a href="http://www.visionofgor.com/00.html" target="main"> <font color="#ffffff"> <b> Intro</a><br><br>
                  <a href="http://www.visionofgor.com/truthfact.html" target="main"> <font color="#ffffff"><b>Fact -vs- Truth</a><br>
                  <a href="http://www.visionofgor.com/bookvsaol.html" target="main"> <font color="#ffffff"> <b> Book -vs- AOL</a><br>
                  <a href="http://www.visionofgor.com/RPcreed.html" target="main"> <font color="#ffffff"> <b>RPer's Creed</a><br>
                  <a href="http://www.visionofgor.com/readercomments.html" target="main"><font color="#ffffff"><b>Comments</a><br>
                  <a href="http://www.visionofgor.com/readercomments.html" target="main"> <font color="#ffffff"> <b>Banners</a><br>
                  <a href="http://www.visionofgor.com/links.html" target="main"> <font color="#FFffff"> <b> Links</a><br>
                  <a href="http://www.meoag.com/VoGcontact.html" target="main"> <font color="#FFffff"> <b> Contact</a>

            </div>
          </center>
        </body>

        </html>




        soybean



          Genius
        • The first soybean ever to learn the computer.
        • Thanked: 469
        • Computer: Specs
        • Experience: Experienced
        • OS: Windows 10
        Re: HTML code to center my website
        « Reply #5 on: August 23, 2008, 10:33:57 AM »
        kpac, perhaps one point of the OP's requirements needs clarification.  Let's say his page is 800 pixels wide, i.e. a fixed width.  He wants the page to display horizontally centered when the viewer is using a larger resolution display and, we'll assume, has their browser window maximized.  For example, see http://hosanna-lutheran.org/

        This type of centering can be done with tables.  Here's a brief reference: http://www.boutell.com/newfaq/creating/fixedwidthlayout.html
         

        Solus Hospes

          Topic Starter


          Greenhorn

          Re: HTML code to center my website
          « Reply #6 on: August 23, 2008, 11:26:20 AM »
          Okay, if I were to use that code for centering, would I simply change the width to my website width?

          i.e.
          Code: [Select]
          <html>
          <head>
          <title>Centered fixed width test</title>
          </head>
          <body style="text-align: center">
          <div style="width: 200px;  <---------------------------------This line?
            margin: auto;
            text-align: left">
           
          (And then post my iframes and nav bar in here?)

          </div>
          </body>
          </html>

          ChrisXPPro



            Adviser

          • Forever Learning
          • Thanked: 4
            • ACB Systems
          • Computer: Specs
          • Experience: Experienced
          • OS: Windows XP
          Re: HTML code to center my website
          « Reply #7 on: August 23, 2008, 11:29:56 AM »
          Late to the party but I'll just make the point that whatever sizing of the page - a ''containment'' is the way to get centering - either by table or - a CSS wrapper ... so a visit to w3schools would prove very useful I think.

          Once container or 'wrapper'  is set up everything within will be held in place.



          Re last question - set your width to your choice - and if wanting to suit folks with 800x600 res - a ''play it safe'' to avoid horizontal scrolling - then use something like 770 pixels for a fixed width... and apply that to container.
          Ain't technology great - until it goes wrong!

          Solus Hospes

            Topic Starter


            Greenhorn

            Re: HTML code to center my website
            « Reply #8 on: August 23, 2008, 12:42:46 PM »
            I am currently reading through that link and when I/if I find a way to center this site effectively, I will post the resolved code here just in case there are other people with my issue.

            Here's to learning!

            And thank you, all of you!

            soybean



              Genius
            • The first soybean ever to learn the computer.
            • Thanked: 469
            • Computer: Specs
            • Experience: Experienced
            • OS: Windows 10
            Re: HTML code to center my website
            « Reply #9 on: August 23, 2008, 12:51:25 PM »
            Okay, if I were to use that code for centering, would I simply change the width to my website width?
            Yes.  You might need to experiment and see whether the width of the actual page should be slightly less or exactly the same as the outer table. 

            ChrisXPPro



              Adviser

            • Forever Learning
            • Thanked: 4
              • ACB Systems
            • Computer: Specs
            • Experience: Experienced
            • OS: Windows XP
            Re: HTML code to center my website
            « Reply #10 on: August 23, 2008, 01:19:11 PM »
            Following the last comment, to add - within your outer 'container' - you can make good use of cell padding and cell spacing to maintain some breathing space around the contents.
            Ain't technology great - until it goes wrong!

            mcxeb52!

            • Guest
            Re: HTML code to center my website
            « Reply #11 on: August 23, 2008, 04:20:45 PM »
            Another thing, if you have a software like FrontPage or Dreamweaver, you might just use their WYSIWYG interface to design a page and then go to their HTML code interface to preview what the results look like to see if it works the way you want it.

            I think those software auto-generates proper HTML coding to fit whatever you're doing in the WYSIWYG interface. So at least you have a skeleton of a code to edit.

            ChrisXPPro



              Adviser

            • Forever Learning
            • Thanked: 4
              • ACB Systems
            • Computer: Specs
            • Experience: Experienced
            • OS: Windows XP
            Re: HTML code to center my website
            « Reply #12 on: August 23, 2008, 06:02:21 PM »
            Further thought - get Komposer ....... it's a freebie (open source) and while not as ''clever'' as DW or Frontpage - does give useful options for checking work in progress.

            Oh and also - search and find ''Multiple IEs" ..... a set of all old IE versions and between 6 and 7 in particular - several differences which make checking very useful.... 5, 5.5 and 6 are well worth having on hand. .. then too browsershots.org can be handy for testing.
            Ain't technology great - until it goes wrong!

            kpac

            • Web moderator
            • Moderator


            • Hacker

            • kpac®
            • Thanked: 184
              • Yes
              • Yes
              • Yes
            • Certifications: List
            • Computer: Specs
            • Experience: Expert
            • OS: Windows 7
            Re: HTML code to center my website
            « Reply #13 on: August 24, 2008, 02:43:46 AM »
            kpac, perhaps one point of the OP's requirements needs clarification.  Let's say his page is 800 pixels wide, i.e. a fixed width.  He wants the page to display horizontally centered when the viewer is using a larger resolution display and, we'll assume, has their browser window maximized.  For example, see http://hosanna-lutheran.org/ 

            The code I gave worked perfectly for me, and that's the code FrontPage 2000 gives you to center a page.
            ------

            I think I found your problem. The frist <div> you have (in the first post), the left-margin is set to 0. You should take out the height also, because this will be set automatically by the content of the page. In your third post, in the code, you're also missing one </div> tag towards the bottom of the code.

            Solus Hospes

              Topic Starter


              Greenhorn

              Re: HTML code to center my website
              « Reply #14 on: August 25, 2008, 12:12:13 AM »
              I really thought we had it that time but no luck. Making those changes brings my page to the far right screen where I have a horizontal scroll bar and then disappears my background picture.  I am beginning to believe the error lies within my code as it was originally written to override some of the AOL profile parameters and post in front of any information placed there. Therefore, the code (while it works for websites) wasn't made for them. I am simply not yet versed enough to start over. But I am reading that site and learning.

              Thanks again!

              kpac

              • Web moderator
              • Moderator


              • Hacker

              • kpac®
              • Thanked: 184
                • Yes
                • Yes
                • Yes
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 7
              Re: HTML code to center my website
              « Reply #15 on: August 25, 2008, 03:04:45 AM »
              Whatever kind of website you are doing, it will still work. It think the problem is, somehow you have one setting to align to the right, and another to the centre.

              Try this: Remove all style, alignment (etc.) tags from the main HTML tags, like instead of <div align="left" style="color:red">, just use <div>. You can fill them back in later, as we go along.

              Now use this as a template:
              Code: [Select]
              <html>
              <head>
                <title>Title of Website</title>
              </head>

              <body>
                <center>
                  <div align="center">
                    <!-- Put everything in here, like the way I said above -->
                  </div>
                </center>
              </body>
              </html>



              Let us know how it goes, but don't give up. ;D
              « Last Edit: August 26, 2008, 08:28:42 AM by kpac »

              soybean



                Genius
              • The first soybean ever to learn the computer.
              • Thanked: 469
              • Computer: Specs
              • Experience: Experienced
              • OS: Windows 10
              Re: HTML code to center my website
              « Reply #16 on: August 25, 2008, 11:01:53 AM »
              kpac, perhaps one point of the OP's requirements needs clarification.  Let's say his page is 800 pixels wide, i.e. a fixed width.  He wants the page to display horizontally centered when the viewer is using a larger resolution display and, we'll assume, has their browser window maximized.  For example, see http://hosanna-lutheran.org/ 

              The code I gave worked perfectly for me, and that's the code FrontPage 2000 gives you to center a page.

              Your code will center content within/on a page but will not center a fixed-width page within a browser window.  You seem to be still missing that point.  The OP wants to center a fixed-width page within the browser window, not just center text within the page.  Look at the link I provided; it's an example. 

              Here's basically how tables can be used to accomplish this.  Paste this into a Notepad file, save it as .html, and open it in your browser, with your brower window maximized with a display resolution greater than 800 pixels wide.  You'll see how it center the page within the browser window, not just the text on the page.

              Code: [Select]
              <html>
              <head>
                <title>Title of Website</title>
              </head>

              <body>
              <table width="100%"><tr><td align="center">
              <table border="1" width="800"><tr><td align="center">

              Paste a long string of text here, wider than 800 pixels. It must be wider than 800 pixels
              for this demonstration.

              </td></tr></table>
              </td></tr></table>
              </body>
              </html>
              « Last Edit: August 25, 2008, 10:59:23 PM by soybean »

              kpac

              • Web moderator
              • Moderator


              • Hacker

              • kpac®
              • Thanked: 184
                • Yes
                • Yes
                • Yes
              • Certifications: List
              • Computer: Specs
              • Experience: Expert
              • OS: Windows 7
              Re: HTML code to center my website
              « Reply #17 on: August 26, 2008, 08:30:35 AM »
              Your code will center content within/on a page but will not center a fixed-width page within a browser window.  You seem to be still missing that point.  The OP wants to center a fixed-width page within the browser window, not just center text within the page.  Look at the link I provided; it's an example. 

              Sorry, not missing any point. Look at my website (under my avatar). Feel free to view the source, and/or look at the CSS.

              san_crazy



                Intermediate

                Re: HTML code to center my website
                « Reply #18 on: September 12, 2008, 07:52:00 AM »
                probably, you will not be able to align your body at center using align attribute of body tag. you can rather put the code inside <table></table> tags and use its align attribute to center the web page.

                Code: [Select]
                <body>
                <table align="center">
                    <tr>
                       <td>
                                <!---  put your entire code here--->
                       </td>
                    </tr>
                </table>
                </body>

                zahid



                  Starter

                  Re: HTML code to center my website
                  « Reply #19 on: November 28, 2008, 12:54:09 PM »
                  Hi dear i am new user but i have some some tips about it

                  1st

                  you Draw Layer and use your code,
                  just you check it



                   <script language="JavaScript" type="text/JavaScript">
                  <!--
                  function MM_reloadPage(init) {  //reloads the window if Nav4 resized
                    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
                      document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
                    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
                  }
                  MM_reloadPage(true);
                  //-->
                  </script>
                  <div id="Layer1" style="position:absolute; left:210px; top:7px; width:921px; height:557px; z-index:1"> <html> <head> <body> <title>
                    <div align="center">Vision of Gor | A players outlook</div>
                  </title>
                    <DIV style="LEFT: 11px; BACKGROUND-IMAGE: url(http://www.freewebs.com/visionofgor/Background.jpg);
                  WIDTH: 800px; BACKGROUND-REPEAT: no-repeat; POSITION: absolute; TOP: 2px; HEIGHT: 550px">
                      <div style="position:absolute; left:170; top:26;">
                      <iframe src="http://www.visionofgor.com/updates.html"
                  name="A" WIDTH="613" HEIGHT="92" frameborder="0" allowtransparency="true"></iframe>
                    </div>
                    <div style="position:absolute; left:169; top:247;">
                      <iframe src="http://www.visionofgor.com/00.html"
                  name="Main" WIDTH="614" HEIGHT="285" frameborder="0" allowtransparency="true"></iframe>
                    </div>
                    <DIV style="PADDING-RIGHT: 0px; OVERFLOW-Y: auto; PADDING-LEFT: 0px; SCROLLBAR-FACE-COLOR:
                  #0000ff; FONT-SIZE: 8pt; Z-INDEX: 1; FILTER: chroma(color=#0000FF);
                           LEFT: 0px; OVERFLOW-X: hidden; PADDING-BOTTOM: 0px;
                           SCROLLBAR-HIGHLIGHT-COLOR: #0000ff;
                  OVERFLOW: auto;
                           WIDTH: 150px; SCROLLBAR-SHADOW-COLOR: #0000ff; SCROLLBAR-3DLIGHT-COLOR: #0000ff;
                           SCROLLBAR-ARROW-COLOR: #A67D1B;
                           PADDING-TOP: 10px;
                  SCROLLBAR-TRACK-COLOR: #0000ff; FONT-FAMILY: Times New Roman; SCROLLBAR-DARKSHADOW-COLOR:
                  #0000ff; SCROLLBAR-BASE-COLOR: #0000ff; POSITION: absolute;
                           TOP: 266px;
                           HEIGHT: 300px;
                  TEXT-ALIGN: justify" allowTransparency> <font size=2>
                      <p align=center> <font color="#000000"> <a href="http://www.visionofgor.com/00.html" target="Main"> <font color="#ffffff">
                        Intro[/url]
                  </font>

                       

                        <a href="http://www.visionofgor.com/truthfact.html" target="Main"> <font color="#ffffff">
                        Fact -vs- Truth[/url]
                  </font>

                        <a href="http://www.visionofgor.com/bookvsaol.html" target="Main"> <font color="#ffffff">
                        Book -vs- AOL[/url]
                  </font>

                       

                        <a href="http://www.visionofgor.com/RPcreed.html" target="Main"> <font color="#ffffff">
                        RPer's Creed[/url]
                  </font>

                       

                        <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff">
                        Reader's Comments[/url]
                  </font>

                       

                        <a href="http://www.visionofgor.com/readercomments.html" target="Main"> <font color="#ffffff">
                        Banners[/url]
                  </font>

                       

                        <a href="http://www.visionofgor.com/links.html" target="Main"> <font color="#FFffff">
                        Links[/url]
                  </font>

                       

                        <a href="http://www.meoag.com/VoGcontact.html" target="Main"> <font color="#FFffff">
                        Contact[/url]
                  </font> </font></DIV>
                    <DIV></DIV>
                  </DIV>
                  </BODY></head></HTML>
                  </div>

                  Regards,
                  Zahid From Pakistan

                  tbartley21

                  • Guest
                  Re: what is the code to make the text fit?
                  « Reply #20 on: December 29, 2009, 03:53:31 PM »
                  I wanted to know what is the code to make the text fit?

                  Quantos



                    Guru
                  • Veni, Vidi, Vici
                  • Thanked: 170
                    • Yes
                    • Yes
                  • Computer: Specs
                  • Experience: Guru
                  • OS: Linux variant
                  Re: what is the code to make the text fit?
                  « Reply #21 on: December 29, 2009, 04:09:56 PM »
                  I wanted to know what is the code to make the text fit?
                  And don't hijack other threads, irregardless of how old they may be.
                  Evil is an exact science.

                  tbartley21

                  • Guest
                  Re: HTML code to center my website
                  « Reply #22 on: December 29, 2009, 04:13:23 PM »
                  Why don't you stop telling me what I should do? If you reply to my question please answer it unless I do not what to read your reply. So do you know the question or not?

                  Quantos



                    Guru
                  • Veni, Vidi, Vici
                  • Thanked: 170
                    • Yes
                    • Yes
                  • Computer: Specs
                  • Experience: Guru
                  • OS: Linux variant
                  Re: HTML code to center my website
                  « Reply #23 on: December 29, 2009, 04:14:20 PM »
                  Why don't you stop telling me what I should do? If you reply to my question please answer it unless I do not what to read your reply. So do you know the question or not?
                  Because you need to know how to follow the rules.
                  Evil is an exact science.

                  tbartley21

                  • Guest
                  Re: HTML code to center my website
                  « Reply #24 on: December 29, 2009, 04:16:00 PM »
                  Well excuse me I am new to computer hope give me a break already. So like I said stop be a smart and answer the question. If not do not reply back.

                  Quantos



                    Guru
                  • Veni, Vidi, Vici
                  • Thanked: 170
                    • Yes
                    • Yes
                  • Computer: Specs
                  • Experience: Guru
                  • OS: Linux variant
                  Re: HTML code to center my website
                  « Reply #25 on: December 29, 2009, 04:18:55 PM »
                  Well excuse me I am new to computer hope give me a break already. So like I said stop be a smart and answer the question. If not do not reply back.

                  No, I don't give anyone a break.  Follow the rules or get no help.
                  Evil is an exact science.

                  BC_Programmer


                    Mastermind
                  • Typing is no substitute for thinking.
                  • Thanked: 1140
                    • Yes
                    • Yes
                    • BC-Programming.com
                  • Certifications: List
                  • Computer: Specs
                  • Experience: Beginner
                  • OS: Windows 11
                  Re: HTML code to center my website
                  « Reply #26 on: December 29, 2009, 04:22:51 PM »
                  Start your own thread, and while your there, hey, you could maybe give some details about your issue, instead of vague semi-suggestive implied questions that make it impossible to answer your question in the first place.
                  I was trying to dereference Null Pointers before it was cool.

                  tbartley21

                  • Guest
                  Re: HTML code to center my website
                  « Reply #27 on: December 29, 2009, 04:25:25 PM »
                  I just want a question to my answer. All that lip is unnecessary.

                  Allan

                  • Moderator

                  • Mastermind
                  • Thanked: 1260
                  • Experience: Guru
                  • OS: Windows 10
                  Re: HTML code to center my website
                  « Reply #28 on: December 29, 2009, 04:28:08 PM »
                  This guy is posting the same nonsense all over. Just ignore him.

                  Quantos



                    Guru
                  • Veni, Vidi, Vici
                  • Thanked: 170
                    • Yes
                    • Yes
                  • Computer: Specs
                  • Experience: Guru
                  • OS: Linux variant
                  Re: HTML code to center my website
                  « Reply #29 on: December 29, 2009, 04:28:19 PM »
                  I just want a question to my answer. All that lip is unnecessary.
                  I think you really have no concept as to how or why to follow the rules.  You really should learn fast though.
                  Evil is an exact science.

                  BC_Programmer


                    Mastermind
                  • Typing is no substitute for thinking.
                  • Thanked: 1140
                    • Yes
                    • Yes
                    • BC-Programming.com
                  • Certifications: List
                  • Computer: Specs
                  • Experience: Beginner
                  • OS: Windows 11
                  Re: HTML code to center my website
                  « Reply #30 on: December 29, 2009, 04:45:08 PM »
                  I just want a question to my answer. All that lip is unnecessary.

                  neither was posting in this thread. "new thread" takes one click. "Post reply" takes two. and yet you've now posted a reply four times, in a very trollish fashion, because you actually think that thread necromancy can be shrugged off just for you. Not that the fact that  this is an old thread is the main problem, IMO- We still don't have the information necessary to answer your question; what are you fitting the text into? a div tag? a table? a page? a textbox? Additionally, if it's HTML, the browser makes sure it fits as  long as you don't make any style changes; if you have a div tag:

                  Code: [Select]
                  <div style="border : 2px solid black;">text goes here</div>
                  then the border will ALWAYS fit the enclosed text, so I think the question is what exactly do you mean by "fit". My suggestion should be taken seriously: create a new thread explaining your issue, in detail; this ensures that more people will see it, too, as many visitors don't view new posts in old threads on the pre-supposition that it is probably some form of spam. I only saw this thread because I thought the real OP was posting; I didn't notice the date of the thread until near the end, when I was about to reply to the ridiculous notion of using javascript for sizing, then I saw the last few replies here. Basically, the rule for starting new threads benefits topic starters, as well. More members are likely to view the post.

                  Start a new thread, add in some of these details:

                  are you using HTML? CSS? what exactly do you mean by "fit", and what are you trying to fit the text into? (as I noted above, most HTML elements will automatically resize based on their contents, and therefore no specific action is required to get text to "fit" unless a style was previously defined that makes it not fit, in which case you simply remove that style attribute and your good to go. A little explanation of what you mean is necessary; perhaps some examples, even, of what you mean.

                  edit: oops, he's gone now. oh well.
                  I was trying to dereference Null Pointers before it was cool.

                  kpac

                  • Web moderator
                  • Moderator


                  • Hacker

                  • kpac®
                  • Thanked: 184
                    • Yes
                    • Yes
                    • Yes
                  • Certifications: List
                  • Computer: Specs
                  • Experience: Expert
                  • OS: Windows 7
                  Re: HTML code to center my website
                  « Reply #31 on: December 30, 2009, 08:10:17 AM »
                  Locked.

                  tbarley21, stop being such an irritant and follow the rules.