SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Alignment Problems

    This is driving absolute bonkers! I am going to punch a hole through my glass window if I can't get this to work. Here is an image for Mozilla and Firebird. Opera and IE is fine
    http://www.btkdesigns.com/damn.gif

    Here is my code I am working with. The div will not center. The include contains a table in the menu.htm file I have tried

    table#contenthold div {

    text-align: center;
    }

    NADA!

    Code:
    <table id="contenthold">
    		<tr> 
    		  <td>
    	<br />
    			  <h2> Gift Basket Categories</h2>
    			  <br />
    	 <div><!--#include virtual="menu.htm" --></div>
    Thanks
    Bryan
    Last edited by jag5311; Sep 24, 2003 at 16:46.

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    The text looks centered to me. Use margin: auto; if you want to center the whole block.

  3. #3
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am refering to the INCLUDED MENU. Notice in the picture how it is way to the left, not centered. Maybe if I try

    table#contenthold div table {blah
    }

  4. #4
    SitePoint Zealot
    Join Date
    May 2003
    Location
    Dover, PA
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jag5311
    This is driving absolute bonkers! I am going to punch a hole through my glass window if I can't get this to work. Here is an image for Mozilla and Firebird. Opera and IE is fine
    http://www.btkdesigns.com/damn.gif

    Here is my code I am working with. The div will not center. The include contains a table in the menu.htm file I have tried

    table#contenthold div {

    text-align: center;
    }

    NADA!

    Code:
    <table id="contenthold">
    		<tr> 
    		  <td>
    	<br />
    			  <h2> Gift Basket Categories</h2>
    			  <br />
    	 <div><!--#include virtual="menu.htm" --></div>
    Thanks
    Bryan
    text-align is not to be used for alignment of block level elements (divs). Internet Explorer wrongly does this.

    Do the following to center a div:
    Code:
    margin-left:auto;
    margin-right:auto;
    http://www.statgfx.com

  5. #5
    SitePoint Wizard jag5311's Avatar
    Join Date
    Jan 2003
    Location
    Somewhere in Indiana
    Posts
    3,082
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    will IE still accept margin-left:auto and margin-right:auto? or do I need the text-align in conjunction?

  6. #6
    SitePoint Zealot
    Join Date
    May 2003
    Location
    Dover, PA
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jag5311
    will IE still accept margin-left:auto and margin-right:auto? or do I need the text-align in conjunction?
    Yes, that works with IE. The only times I ever had problems with that was while using XHTML and having <?xml... on the first line.
    http://www.statgfx.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •