Cannot Center page with CSS

I don't know what I'm doing wrong here - http://www.team2learninc.com/index.htm. I have a simple page that I use CSS to control the HTML code, but I can't seem to get the body of the page appears centered horizontally.

I visited many CSS sites looking for a solution and do not see what I am doing wrong. I'd appreciate any help you could offer.

Here is my CSS code...

Nancy,

Thanks for the help. I replaced my CSS code with your body, but it still doesn't work. That's just why I left 5 years of programming desktop applications. You can do everything right, and it may not always work.

I'm always looking for the solution. I moved my CSS file to a CSS directory to the root directory of the site and reconnected to the web page in question. I restarted IIS. I deleted all of the old CSS files from the server. I deleted all my Firefox cache files. I've done all I can think about... and the problem still persists.

--Also caught a break here ranting to try to notice all the code and test the CSS line-by-line. And I found the problem. The "float: left;" in the container was the problem. Removed and broke everything in the Center.

I thought that the contents of any container being smoothed would wrap only if there was a point to wrap. But, according to http://www.w3schools.com/css/pr_class_float.asp, "the image or text moves to the left in the parent element" that substitutes obviously centering of the container.

My centering code is as follows...

{body
Width: 100%;
text-align: center;
Auto margin: 0;
padding: 0;
do-size: 100%;
}

#container {}
/ * float: left; */
Width: 955px;
left margin: auto;
margin-right: auto;
text-align: left;
}

.. .so I still don't really understand why "float: left;" in the container caused section alignment to the left of the entire page.

If you can shed some light on this, I'd love to hear the reason for this behavior.

Tags: Dreamweaver

Similar Questions

  • Trying to Center a web page with css

    Hello

    My friend asked me to help with their web site.  She appears when it was developed it was not tested in a resolution setting of 1024 x 768 and view this site with resolution shows a non centered page, a web page centered, it is what they would like.  I have looked for alternatives, but have not been able to solve the problem with any.  I must be missing something, I don't think that he would give me this much trouble.  Anyway, the site is http://meidlwatersystems.com any assistance that you can give is appreciated.  Here's the css

    Thank you

    {body
    background-color: #658ABB;
    }

    {#white_background}
    position: absolute;
    left: 214px;
    top:-2px;
    Width: 816px;
    z-index: 0;
    background-color: #FFFFFF;
    layer-background-color: #FFFFFF;
    border: 1px none #000000;
    }

    {#blue_fade}
    position: absolute;
    left: 215px;
    top: 18px;
    Width: 152px;
    height: 62px;
    z index: 2
    }

    #logo {}
    position: absolute;
    left: 236px;
    top: 35px;.
    Width: 249px;
    height: 86px;
    z index: 3
    }

    {#phnumber}
    position: absolute;
    left: 821px;
    top: 59px;
    Width: 144px;
    height: 23px;
    z index: 3
    }

    {#tan_fade}
    position: absolute;
    left: 232px;
    top:-2px;
    Width: 100px;
    z index: 1
    }

    {#nav_bar}
    position: absolute;
    left: 354px;
    top: 148px;
    Width: 276px;
    height: 24 PX.
    z index: 4
    }

    {#quote}
    position: absolute;
    left: 401px;
    top: 204px.
    Width: 155px;
    height: 19px;
    z index: 5
    }

    #footer {}
    position: absolute;
    left: 367px.
    Width: 656px;
    height: 76px;
    z index: 9;
    }

    In addition, you cannot focus divisions of absolute positioning because they are positioned compared to its parent container, which is usually the top left of the browser window.

    Well, of course you can.  Wrap the page in a relatively positioned container, which is centering (don't forget that they are not simply positioned compared to its parent container - it is their nearest POSITIONED ancestor).  Of course, you have to manually reposition AP elements to the correct location after doing this.

  • Cannot delete pages with Acrobat Pro DC

    Hello

    I can't remove the pages of a PDF with Acrobat Pro DC

    I checked the properties and full control is thus authorized to change. I can actually change the text within the document, but I don't see how to remove some pages. The Edit function is accessible but not delete it.

    I'd be in a specific mode to delete the pages and if so, how access?

    Thank you

    Michael

    Process of

    1 tools > organize Pages

    2. select relevant thumbnails page (s) you want to delete

    3. click on the trash icon.

    4. in the 'Adobe Acrobat' dialog box message that says "are you sure you want to remove the page from the document?", click on the OK button.

    5. now, you can save the file or to continue working with the file.

  • Change the image of the body on each page with CSS

    Hello

    I need to have a different background image for each page of this site (body)

    (1) I have a model now

    (2) I have a css file currently (Hardcover)

    I did a lot of research on how better do this including;

    (a) using the different body for each page ID.

    (b) using another rule of css for the body (inserted in th file AFTER the main related ccs leader)


    Because I'm using templates I don't see an easy way to do it (the header is largely locked) and have little control over the position of b) and identical to one) as the body, tag is also blocked. I have also considered the 'specify editable tag attributes in a template', but could not get this to work.

    There is something simple to do here, but I can't.

    Any sample / advice would be appreciated.

    Rick

    The easiest way is to have a CSS on every page like this:

    There is no other way to make everything simpler.

  • Cannot open files with Windows XP media center edition .exe

    Cannot open .exe with Windows XP media center edition files.  Computer Dell did not come with a rear disc

    Hi CLueking,

    1. what happens when you try to open any .exe (executable) files? You get the error message?

    2. you remember to make changes to the computer, after which the issue started?

    I suggest trying the Microsoft Fixit and/or manual steps from the following links and check if it helps:

    Diagnose and repair Windows files and folders problems automatically

    You receive an error message when you try to start a program that has the an.exe file name extension

    How to change or choose the program that starts when you double-click a file in Windows XP

    I hope this helps.

  • Microsoft Media Center remote with pace DC50X 1039, Setup box cannot change channel

    Can I use Vista Media Center to record only TV etc...
    Recently I had to use a configuration of Comcast Digital adapter carrier (DC50X) in order to get access to the channels.

    Vista recognize the Remote Setup Box, but it is not able to change the channels of the Remote Microsoft.

    On this page: http://mythtv.org/wiki/MCE_Remote I have the 3rd remote from left to right.

    I contacted PACE (the author of the configuration box) with the following response:
    ". The DC - 50 X uses a new remote protocol called XMP. Check to see if it can emit IR codes using the XMP Protocol.
    "If you use Microsoft remote issue codes using the XMP Protocol, it will not work with the DC 50 x
    "

    Anyone know if Microsoft Remote is able to use the XMP?

    Someone knows how the Media Center as the configuration box to change the channel?
    It looks like, it uses IR (due to the extra step of IR with the configuration box).

    If you have a WMC working with the DC50X, what is your Setup, what version of the distance, whats is your hardware configuration?

    My tuner (Hauppauge WinTV-PVR-500) can see the image, the sound is fine.

    Any help would be much appreciated.

    Deckard6, please see the Microsoft Hardware site:
    http://www.Microsoft.com/hardware/default.aspx

    Also try:
    Remote control for Media Center PC with Windows

    We can help you with Vista related components, if you feel that your Media Center software configuration is at fault for what you are experiencing, then we can try wrong turn, however, if it is indeed the remote transmitting Protocol, then it is not in our support framework. Rami
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • HP 5520: Cannot scan multiple pages with 5520 Scanner HP on Mac with Yosemite

    Hello, I am unable to scan several pages using my HP 5520 on my new iMac with Yosemite. I can scan only one page. The answers solved on this page are old and I can't make them work. Thanks a lot for your help!

    Hi @goldenm,

    Welcome to the HP Forums!

    I understand that you cannot scan multiple pages with your HP Photosmart 5520, on Mac OS X 10.10 Yosemite. I'm happy to help you!

    What happens when you try to scan several pages? Do you get any error messages?

    In the meantime, try the following steps:

    How to scan multiple pages into a single file with HP Scan?

    Load the document and use HP Scan to scan and save as a file of several page.
  • Problem: The Page with the title bar, Vertical alignment Center does not work BB 10 keyboard (720 x 720)

    Hello

    I want centered vertically align something (for example, a label) on a page with the qml following, but it is not aligned properly on the keyboard BB (720 x 720), it aligns on the contrary always on top. It aligns not centered vertically as expected on BB 10 all touch (1280 x 768).

    import bb.cascades 1.0
    
    Page {
        titleBar: TitleBar {
            title: "Title"
        }
        Container {
            layout: DockLayout {
            }
            background: Color.create("#444444")
            verticalAlignment: VerticalAlignment.Fill
            Label {
                text: "label"
                verticalAlignment: VerticalAlignment.Center
            }
        }
    }
    

    I realize also realize that if I remove the title bar, and then it snaps as I want. Anyone have a solution this? Thank you.

    Try with this:

        titleBar: TitleBar {
            title: "Title"
            scrollBehavior: TitleBarScrollBehavior.Sticky
        }
    
  • Is it possible to export a page as muse and html associated individual with css?

    Is it possible to export a page as muse and html associated individual with css?

    Yes, Muse has an export as HTML feature.

  • Cannot change the ASPX page with Webdav connection

    I can't change the ASPX pages with webdav on my IIS6/win03 server connection. I connect to the site very much, but when I press the edit button I get an error message stating 'cannot lock the page for editing at the moment. Try again later. "I can edit pages html very well. I can edit ASPX pages if my connection is set to network and I am on a network share. I have even another server where I can connect with webdav and editing ASPX pages.

    Looks like a configuration problem on this particular server, but I have no idea what it is, and I can't find answers. Anyone had this problem before? How did you solve this problem?

    I tried to delete the LCK and defining files and the files from scratch, no luck.

    THX

    OK, I thought about it. If you run 2 sites in IIS, you must take pages aspx on extensions to the application. Go to the properties on the site that you have the connection to via Webdav and click the configuration button. Remove the entry for the aspx extension.

    I guess this is the answer for people having problems with other pages such as php and asp, server-side

  • He cannot receive my email on the same page with msn.

    Why I check my email on the same page with my email msn before?

    Hi Zetouncarey,

    I suggest you to contact MSN support for assistance on this issue.

    How to contact MSN customer service
    http://support.Microsoft.com/kb/940784

    Hope this information helps you. If you need additional help or information on Windows, I'll be happy to help you.

  • IE defining the additional margin at the top and bottom of page using CSS

    Hello

    I am struggling with getting a site to look right in Internet Explorer.

    I wonder if anyone knows the answer or has some ideas to help me solve the problem...

    I use the headers and footers on a background image (with repeat-y on the style sheet) to give me a picture frame effect. You can see what it's supposed to look like below, using Firefox, Opera or Netscape browsers.

    http://www.sueharrington.co.UK/layout_tmpl_test.htm

    However, in Internet Explorer, I get two problems.

    1. the extra space at the top and in bottom of header and footer gifs.
    2 bar (middle of the page) seems to have space for additional margin in IE, causing it to wrap around.

    I managed to product another site where he works, but cannot see what is different about this one.

    http://www.enscott.co.uk/indexb.htm - work in IE and Firefox

    Someone at - it had indications or experienced this problem?

    Thanks in advance

    Neil

    (I use a Dreamweaver template to generate the pages, but cannot see this difference make?)

    It solved! - Or at least got a job.

    This came from the discovery of EI mismanages the following values

    margin-bottom
    height

    Basically low-margin or abbreviations seem to be ignored on the labels of stylesheet id (#). To test this, compare the following on IE and another browser (Firefox, for example)

    To see this, write this stylesheet

    {body
    background-color: #FFFF00;
    margin: 0;
    }

    {#wrapper}
    background-color: #FF0000;
    Auto margin: 100px;
    height: 1000px;
    Width: 770px;

    for this html code





    Display in IE and Firefox (or another browser)

    Firefox poster correctly a red box on a yellow page with 100px margin top and bottom - that is to say however has a zero at the bottom.

    Then apply the 100px high and the bottom margin to the "body" as below, leaving unchanged #wrapper.

    {body
    background-color: #FFFF00;
    Auto margin: 100px;
    }

    Firefox is unchanged: he seems to ignore the margin-top on the body.

    IE now shows a box with a tope 200px margin and a lower margin of 100px.

    The other interesting thing appeared with the parameter "size".

    If you insert a header or a footer background URL in a stylesheet, Firefow requires that you leave space for your background, or it does not show.

    So for a 16px high gif, use the following text in the style sheet. (It used to a gif in footer)

    #footer {}
    background-image: url (.. / images/bg_bottom.gif);
    background-repeat: repeat no.;
    height: 16px;
    Clear: both;
    }

    IE requires the value of 'height', but it is not guaranteed. (Even 1px or 1%) - if it is present, it works.

    Unfortunately, this does not solve my pixels very little space, but made me think - if the margin is not properly handled on the tags "#", if I do the

    the same color as the outside of the screen, it will not appear. This is easily done by using the following

    background-color: #999999;

    If my final CSS stylesheet looks like this

    / * to position the image in the browser * /.

    {body
    background-color: #999999;
    margin: 10px 0;
    padding: 0;
    }

    (/ * to contain and center of the page and product image sides) * /.

    {#wrapper}
    Width: 810px;
    Auto margin: 0;
    background-image: url (.. / images/bg.gif);
    background-repeat: repeat-y;
    }

    / * to keep the photo album frame * /.

    #banner {}
    height: 15px;
    background-image: url (.. / images/bg_top.gif);
    background-repeat: no-repeat;
    }

    / * to keep the background image * /.

    #footer {}
    background-image: url (.. / images/bg_bottom.gif);
    background-repeat: repeat no.;
    height: 16px;
    background-color: #999999;
    Clear: both;
    }

    With the html as follows







    content of the page here






    This gives the desired frame "image". Still not 100% sure why the problem of initiall which happened, but this seems to fix.

    The final page can be seen at

    http://www.sueharrington.co.UK/layout_tmpl_demo.htm

    Thanks for your help.

    See you soon

    Neil

  • How to center an image CSS Gallery?

    How did you would focus an image gallery based CSS on a page?

    Here's the html and CSS code

    Thank you

    < html >

    < head >

    < style type = "text/css" >

    div.img

    {

    margin: 2px;

    border: 1px solid #0000ff;

    height: auto;

    Width: auto;

    float: left;

    text-align: center;

    }

    IMG div.img

    {

    Display: inline;

    margin: 3px;

    border: 1px solid #ffffff;

    }

    div.img a: hover img

    {

    border: 1px solid #0000ff;

    }

    div.DESC

    {

    text-align: center;

    Police-weight: normal;

    Width: 120px;

    margin: 2px;

    }

    < / style >

    < / head >

    < body >

    < div class = "img" >

    < a target = "_blank" href = "klematis_big.htm" >

    < img src = "klematis_small.jpg" alt = "Clematis" width = "110" height = "90" / > "

    < /a >

    < div class = "desc" > add a description to the image here < / div >

    < / div >

    < div class = "img" >

    < a target = "_blank" href = "klematis2_big.htm" >

    < img src = "klematis2_small.jpg" alt = "Clematis" width = "110" height = "90" / > "

    < /a >

    < div class = "desc" > add a description to the image here < / div >

    < / div >

    < div class = "img" >

    < a target = "_blank" href = "klematis3_big.htm" >

    < img src = "klematis3_small.jpg" alt = "Clematis" width = "110" height = "90" / > "

    < /a >

    < div class = "desc" > add a description to the image here < / div >

    < / div >

    < div class = "img" >

    < a target = "_blank" href = "klematis4_big.htm" >

    < img src = "klematis4_small.jpg" alt = "Clematis" width = "110" height = "90" / > "

    < /a >

    < div class = "desc" > add a description to the image here < / div >

    < / div >

    < / body >

    < / html >

    Put all HTML code for images in a div tag, then give him wide enough to contain your images and then Center the div.

    Add this to your HTML page with an element of closing of course, after the corresponding code:

  • Implementation of site definitions for a dynamic web page with local testing

    I'm new to php. I am bound and determined to create a PHP site for a mySQL database (I was able to create 700 site database in MAMP - yay!) One more step!). Now, I want to set up a test page, to help me learn dynamic pages and have access to my database. I want to test pages locally, and not sure that I've implemented the new site correctly.

    I'm on a Macbook Pro using CS4. 10.6 system

    Here is how I filled the site definitions:

    -Name: test

    -HTTP address: http://mysite.com/public_html (of course, I used my real instead of mysite domain URL)

    -Server tech: Yes, PHP mySQL

    -Edit and test locally (MAMP is installed and working, so I think it's the right choice)

    -L' storage location of the files: I've come to the place where I want to store this test.

    / Users/username/Desktop/database / public_html /.

    -What URL used to access the root: http://localhost/public_html

    When I type 'test', I get...

    ERROR: DW cannot use the prefix you have entered to display data in real time. I clicked on 'Help' but I was unable to solve the problem...

    In addition, the sign '+' is gray in the databases, so I think it has something to do with site definitions, I've used.

    Thank you! The journey of a thousand miles begins with one step...

    I'm glad that you finally got there in the end. If you are looking for tutorials, you would like to try this tutorial into three parts that I wrote for Adobe: create your first dynamic PHP site. It begins simply, but becomes progressively more advanced, so do it slowly.

    You might also be interested in some of the books I've written. See my website, http://foundationphp.com/ for more details. As you use Dreamweaver CS4, The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP, is probably the best. For a more general, non-Dreamweaver specific approach, there are PHP Solutions, second edition. I try to credit with a certain intelligence readers, so I wouldn't say my books "for Dummies". But they are written in a simple style, non-jargon and seem to be well liked by many people.

  • "Safari cannot open page nm because it can't find the server nm.

    I have Safari 9.1.1 and recently to get a message "Safari cannot open page nm because it can't find the server nm. I have an I - mac with OS 10.11.5. Other browsers open as always and I can access Safari bookmark marked pages. Don't know what else to add to help with the options.

    Quit Safari and restart it by pressing the shift key. Any change?

Maybe you are looking for

  • HP Pavilion g6-1b79dx: HP Pavilion g6-1b79dx drivers

    Hello, I can not find some drivers for HP Pavilion g6-1b79dx. I run windows 7 ultimate 64-bit. simple simple communication PCI - PCI VEN_8086 & DEV_1E3A & SUBSYS_196F103C & REV_04 bus controller universal series (usb) - PCI VEN_8086 & DEV_1E31 & SUBS

  • Computer HP laptop starts windows due to corruption of the registry

    Original title: HP laptop starts windows my hp Pavilion dv4-1028us will not get to windows at all that I pushed f10 but do not know what I am looking for a signature of the problem with the numbers popped up and clear terms only were corrupt registry

  • Blue screen of death of locale: 1033 BCCode: d1

    Hi, I just purchased a Lenovo Thinkpad Edge 14 in July and I havn't had a problem with it so far. But recently I just got BSOD with the Codes of the following report: Signature of the problem: Problem event name: BlueScreen OS Version:6.1.7600.2.0.0.

  • Windows 7 Enterprise 90 day trial removed

    I guess that Windows 7 90 day evaluation has been removed? http://www.Microsoft.com/en-us/evalcenter/evaluate-Windows-7-Enterprise If this is the case could Microsoft makes mention that the evaluation of Windows 7 is discontinued opposed to simply om

  • Cannot switch to WIN7 Home Premium to WIN7 Professional

    All trying to solve a problem with Windows Update will not download updates, I fear that a cleaner spyware I used at the time, this problem occurred firstly has deleted some registry information (and I thought that that may have caused problems with