SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    May 2005
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    1px to short problem in firefox

    Here is what is should look like (in IE and Opera) but this is what it looks like in firefox. As you can see the "Member Info" bar is 1px shorter than it should be. Here is my code:
    HTML Code:
    <center><img alt='' src='/images/customer-area.gif'  />
    <form action='./password_proccess.php' method='post'>
    <div class='member-wrap'>
    <div class='member-left'>
    		<div class='table-top-wrap'><div class='table-top'><h2>Members Info</h2></div></div>
    		<table class='main-table-members' cellpadding='0' cellspacing='1'>
    		<tr>
    		<td class='column1' width='100%'><b>Welcome John Smith</b><br /><br />
    		 <a href='/customers/help.php'>Help Page</a><br />
    		 <a href='/customers/support.php'>Contact Support</a><br />
    		 <a href='/customers/order.php'>Products</a><br />
    		 <a href='/customers/email_edit.php'>Change my email</a><br />
    		 <a href='/customers/password_edit.php'>Change my password</a><br />
    		 <a href='/customers/logout.php'>Logout</a></td>
    		</tr>
    		</table>
    </div>
    <div class='member-right'>
    			<div class='table-top-wrap'><div class='table-top'><h2>Change Your Password</h2></div></div>
    		<table class='main-table-members' cellpadding='0' cellspacing='1'>
    		<tr>
    		<td class='column1' width='50%' valign='top'><b>Your new password:</b></td>
    		<td class='column2' width='50%' valign='top'><input type='password' name='password_edit' /></td>
    		</tr>
    		<tr>
    		<td class='column1' width='50%' valign='top'><b>Confirm your current password:</b></td>
    		<td class='column2' width='50%' valign='top'><input type='password' name='password_edit2' /></td>
    		</tr>
    		<tr>
    		<td class='column1' width='50%' valign='top'><b>Confirm your current password:</b></td>
    		<td class='column2' width='50%' valign='top'><input type='password' name='password_confirm' /></td>
    		</tr>
    		</table>
    </div>
    </div>
    <div class="clear-div"><br /><br /><br /></div>
    <input type="submit" value="Save Changes" />
    </form>
    </center>
    CSS used:
    Code:
    .member-wrap {
    	width: 98%;
    	text-align: center;
    }
    
    .member-left {
    	float: left;
    	width: 28%;
    	/*height: 100%;*/
    	text-align: center;
    }
    
    .member-right {
    	float: right;
    	border: 0;
    	width: 71%;
    	text-align: left;
    }
    
    .main-table-members { 
    	margin: 0;
    	padding: 0;
    	width: 100%;
    	height: 200px;
    	background-color: #FFFFFF;
    	border: 1px solid #000000;
    	border-top: 0;
    }
    
    .table-top-wrap { 
    	margin: 0;
    	padding: 0;
    	border: 1px solid #000000;
    	border-bottom: 0;
    }
    
    .table-top { 
    	margin: 0;
    	padding: 0;
    	height: 25px;
    	background: #175299 url("/images/top_bg.gif");
    	color: #FFFFFF;
    	font-size: 1em;
    	text-align: center;
    	border: 1px solid #FFFFFF;
    	border-bottom: 0;
    }
    
    .table-top h2 {
    	padding-top: 4px;
    	color: #FFFFFF;
    	font-size: 1em;
    }
    
    .clear-div {
    	font-size:1px;
    	overflow:hidden;
    	clear:both;
    }
    I know the problem is caused by the widths in member-right and member-left.

    Thanks
    Last edited by aaron118; Jun 21, 2006 at 16:10.

  2. #2
    SitePoint Member
    Join Date
    Apr 2006
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Internet explorer places the border within the parent elements width, FireFox places the border outside the width.

    You can solve this problem by adding this to your stylesheet:

    Code:
    * { 
    box-sizing: border-box; 
    -moz-box-sizing: border-box; 
    }

  3. #3
    SitePoint Addict
    Join Date
    May 2005
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I add that, now both table headers are 1px to short?

  4. #4
    SitePoint Addict
    Join Date
    May 2005
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also I have just realised if I add that, the headers don't show their image background in firefox?

  5. #5
    SitePoint Addict
    Join Date
    May 2005
    Posts
    297
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any idea, thanks.


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
  •