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 9 of 9
  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    9
    Member #
    13158
    Ok first let me get this off my chest and say that this is my first CSS validated "webpage" (It is only ONE page right now, but I plan on using php, xml, and a DB for content managment. Basically put CSS to use. :ermm: )

    Anyway the site validates except for 1 error in the body:
    text-align: middle;
    Which I use to try to center the whole page.
    (If you have any suggestions or a better way to do this. Please SHARE! )

    OK, now here is my problem: Internet Explorer.
    Must I say more?

    IE completely anhilates my site. :surprised:
    http://vonotu.com

    If you have any articles, links or suggestions to start debuging my site for multi-browser and platform perfection. Please post.

    You can also be a critic to it.

    The site loads slow. I know. I'll work on that later. Right now im trying to get it to look like what it's supposed too. Firefox. Mozilla. etc.

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    text-align: middle;

    "middle" is not a property ..

    text-align: left;
    text-align: center;
    text-align: right;
    text-align: justify;

    ... and if you do this part in the body{ portion of your
    CSS file, it will render correctly for IE.

    margin: auto;
    padding: 0px 0px 0px 0px;
    text-align: center;


  4. #3
    Junior Member
    Join Date
    May 2006
    Posts
    9
    Member #
    13158
    I have tried using:
    text-align: center;
    This centers ALL TEXT within objects inside the body, so I would have to
    text-align: left; All the objects

    That still does not address any of the DIV problems im having in IE.
    Thanks for your tip. I guess ill start aligning text to left in the objects now.

  5. #4
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    you need text-align: center; in you body { } in order for IE to understand the centering.

    Here's the basic syntax to center a site. Apply the missing elements to yours

    css
    Code:
    /* this eliminates ALL default padding and margin of every elements */
    * {
      margin: 0;
      padding: 0;
    }
    
    body {
      text-align: center;
    }
    
    #wrap {
      width: 780px;
      margin: 0 auto;
      text-align: left;
    }
    html
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    	<title>title</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<link rel="stylesheet" href="/css.css" media="screen" type="text/css" />
    </head>
    
    <body>
    <div id="wrap">
    
    content goes here
    
    </div>
    </body>
    </html>
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  6. #5
    Junior Member
    Join Date
    May 2006
    Posts
    9
    Member #
    13158
    Ok, you want me to wrap the whole page in a DIV?
    Is this so I can center the page, without having to align each individual object with text-align: left; ? Or is this to fix the display problems in IE? :classic:

    bte cute Kid :-p in your avatar.

    Thank you for your help aranoid:

  7. #6
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    That will center your page...

    To kill the center alignment add a text-align: left; in #wrap in the css. I'll change my post to reflect that.
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  8. #7
    Junior Member
    Join Date
    May 2006
    Posts
    9
    Member #
    13158
    Ok. I think I got the centering working in all browsers and still have it validate. Thank you guys. Yet, im still having problems with displaying the divs correctly in IE and Opera, Im pretty confident that if I get it working in IE it will work in opera and any other browser. Even linux and MAC platforms.

  9. #8
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,723
    Member #
    5580
    Liked
    718 times
    As a rule, always get your site to render in Firefox ...

    THEN, work on IE (as IE often requires hacks to make it work).

    Mozilla Firefox is the one you want to develop with.


  10. #9
    Junior Member
    Join Date
    May 2006
    Posts
    9
    Member #
    13158
    Yes, thats what I tried to do
    But now im having more trouble "hacking" it to IE then creating it for FF.


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 03:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com