Centering page in browser

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • nicholas@x-west.com
    Private First Class

    • Feb 2006
    • 6

    Centering page in browser

    Hi,

    1) I have problems centering my webpage in the browser. I have already marked 'Center in browser' under page properties. On my 15 inch screen it was centered, but on 17 inch screens it was a bit to the left. I have now centered my whole site to the utter left of the browser to avoid the problem. However, I would really like it to be centered on all screens.

    2) I would really like to change my username here in the forum. How can I do this?

    webpage: www.x-west.com



    I highly appriciate any help :)

    Nicholas
    X-west Adventures
    adventure travel in the fjords of Norway
    www.x-west.com
  • steve_w
    Sergeant

    • Sep 2005
    • 20

    #2
    Re: Centering page in browser

    Here's how to do it. Are you familiar with css? If so, pop this in your css folder. If not, add it to every page. I'd recommend the former.

    body
    {
    text-align: center;
    }
    div#container
    {
    margin-left: auto;
    margin-right: auto;
    width: 50em;
    text-align: left;
    }


    Nice website, by the way.

    Comment

    • RPW
      Staff Sergeant

      • Jan 2006
      • 49

      #3
      Re: Centering page in browser

      Nice website. I will be trying to generate something similar myself. Was this done justwith Vodahost or did you buy any template and alter that?
      Also suggest you have a link on your contact page so that someone can click on the email address.

      The photos are fabulous and eye catching. You may have hooked a future client !

      Comment

      • nicholas@x-west.com
        Private First Class

        • Feb 2006
        • 6

        #4
        Re: Centering page in browser

        Thank you! I have done it purely with BV. What I did was that I searched a lot on the internet to find sites that I liked. I then took some ideas here and there and tried to make them in BV. Not very creative maybe, but worked for me...

        Would love to have you as a client by the way :)
        X-west Adventures
        adventure travel in the fjords of Norway
        www.x-west.com

        Comment

        • nicholas@x-west.com
          Private First Class

          • Feb 2006
          • 6

          #5
          Re: Centering page in browser

          Steve W:
          thanks for the advice. Have not done CSS but I will try to figure ut out.
          X-west Adventures
          adventure travel in the fjords of Norway
          www.x-west.com

          Comment

          • steve_w
            Sergeant

            • Sep 2005
            • 20

            #6
            Re: Centering page in browser

            Nicholas

            I have looked at the source code of your website and you have css on each page. Blue Voda does this for you but it is easy to learn how to define all your pages from one css file rather than having css on every page.

            Heres how to create your css file.

            1. Open Notepad.
            2. Copy and paste the code I gave you earlier.
            3. Save it as 'fjords.css'
            4. Go to Control Panel and click on 'File Manager'
            5. Select 'Public html'
            6. Select 'Upload Files'
            7. Upload the fjords.css file
            8. In the head section of your pages, insert the following:

            <link rel="stylesheet" type="text/css" href="fjords.css"

            Now your pages will be centered. For more in depth tutorials, visit http://www.w3schools.com/css/default.asp

            Failing that, just add the code to each web page.

            I have the same problem as you, in that I also want centered pages. I can center them using the above css, but unfortunately my drop down menus also get centered. So my pages are stuck on the left too! Mind you, your website looks fine as it is and I don't think too many people are bothered about where the pages lie in their browser. Two of the most respected websites, w3org and BBC.co.uk are aligned left, and one suspects that what is good enough for them should probably be good enough for the rest of us!

            Good luck with it if you decide to carry on down that road.

            Comment

            • steve_w
              Sergeant

              • Sep 2005
              • 20

              #7
              Re: Centering page in browser

              <link rel="stylesheet" type="text/css" href="fjords.css">

              Oops, forgot the end bracket.

              Comment

              • nicholas@x-west.com
                Private First Class

                • Feb 2006
                • 6

                #8
                Re: Centering page in browser

                Thank you so much for helping me out here. As I am totally new to webdesign I have a lot to learn.

                I have done step 1-7 from you instructions but I can't seem to figure out step 8: "In the head section of your pages, insert the following". What is the head section? Where do I insert <link rel="stylesheet" type="text/css" href="fjords.css">?

                Again, thank you.
                X-west Adventures
                adventure travel in the fjords of Norway
                www.x-west.com

                Comment

                • navaldesign
                  General & Forum Moderator

                  • Oct 2005
                  • 12080

                  #9
                  Re: Centering page in browser

                  Originally posted by nicholas@x-west.com
                  Thank you so much for helping me out here. As I am totally new to webdesign I have a lot to learn.

                  I have done step 1-7 from you instructions but I can't seem to figure out step 8: "In the head section of your pages, insert the following". What is the head section? Where do I insert <link rel="stylesheet" type="text/css" href="fjords.css">?

                  Again, thank you.
                  Go to Page HTML and click the "Between Head" tag. Paste the code in the window.

                  However i don't understand why the Center in Browser doesn't work for you. I re-created your page, directly from your site, in BV, and it centers perfectly. Rollovers and some other things don't work, but thats just because i didn't spend much time in adjusting it. Have a look at http://www.navaldesign.info/Tips/xwest.html
                  Navaldesign
                  Logger Lite: Low Cost, Customizable, multifeatured Login script
                  Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
                  DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
                  Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

                  Comment

                  Working...
                  X