CSS and Different Browser Woes

Status
Not open for further replies.

TheDancingFetus

Baseband Member
Messages
68
Location
Cleveland
I am building a website. I have most of it working and dynamically generating with PHP, but for what ever reason on this one page I am having all kinds of trouble getting all browsers to render properly.

I have the page looking like I want in IE6-9, Latest Chrome, and Latest Opera. I want the <div> at the bottom to be center underneath the other divs.

Firefox doesn't even come close. It wants to format the table to the very end of my <div id="thumbstrip">. Whats weird it is outside the <div id="PhotoGrid"> width when it does that. Very confusing to me.

Safari has everything correct, except it won't center my table. Safari will center my table if there is a <p>Some Text</p> over the <form>, problem is I don't want text over the <form>.

I have fought with this page for hours. My latest test was to strip all the PHP out and see if maybe a variable was doing something I was missing, but even then no go. My code is as follows:

Main HTML Page:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
<title>Double Take: Login</title>
<!--Site CSS-->
<link href="CSS/doubletakestyle.css" rel="stylesheet" type="text/css" media="screen" />	
<!--End of Site CSS-->
<meta name="description" content="Sarah Trotter's Doubletake Photography, Portrait and Event Photographer" />
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>

<body>
<!--Menu Bar-->
<div id="TopPage">
<p><a class="heading" href="home.php">Heading</a></p><br />
<ul class="toplinks">
<li><a href="Page.php?site=2">Link 1</a></li>
<li><a href="Page.php?site=1">Link 2</a></li>
<li><a href="Page.php?site=15">Link 3</a></li>
<li><a href="Page.php?site=5">Link 4</a></li>
<li><a href="Page.php?site=3">Link 5</a></li>
<li><a href="Page.php?site=4">Link 6</a></li>
<li class="lastright"><a href="Page.php?site=6">Link 6</a></li>
</ul>
<ul class="login">
<li class="lastright"><a href="Page.php?site=7">Link 7</a></li></ul>
</div>
<!--End of Menu Bar-->

<!--Photos-->
<div id="PhotoGrid">
	<div id="thumbstrip">
		<ul>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
			<li><img src="1.jpg" alt="1" /></li>
		</ul>
	</div><br />
				
<div>
	<form action="login.php" method="post">
		<table class="loginbox">
				<tr><td colspan="2" align="center">Double Take Customer Login</td></tr>
        		<tr><td align="left">Username:</td><td align="left"><input name="myusername" type="text" id="myusername" /></td></tr>
                <tr><td colspan="2"></td></tr>
        		<tr><td align="left">Password:</td><td align="left"><input name="mypassword" type="password" id="mypassword" /></td></tr>
                <tr><td colspan="2"></td></tr>
        		<tr><td colspan="2" align="center"><input type="submit" value="Login" name="Submit" /></td></tr>
       		</table>
    </form>	
</div>
</div>
<!--Photos-->
</body></html>

CSS Page:
Code:
/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

body{
	background-color:#000;
	color:#fff;	
}

#TopPage {
	margin: 0px auto 0px auto;
	width: 1125px;
	height: 75px;
	display:block;
	color: #fff;
}

#TopPage p{
	text-align:left;
	position:relative;
	top:5px;
}

#TopPage li {
	display: inline;
	margin-right: 15px;
}


#TopPage .toplinks{
	list-style:none;
	display: inline;
	float:left;
}

#TopPage .login{
	list-style:none;
	display: inline;
	float:right;
}

#TopPage .lastright{
	margin-right: 0px;	
}

#TopPage a{
	font-family: Arial, sans-serif;
	font-size: 14px;
	text-decoration:none;
	color: #fff;
}

#TopPage a:hover{
	text-decoration:underline;
}

#TopPage a.current{
	font-weight: bold;
}

#TopPage a.heading{
	font-size: 28px;
	font-family: monospace;
	color: #fff;
	text-decoration:none;
}

#TopPage a.heading:hover{
	text-decoration:none;
}

#PhotoGrid{                    /*SlideShow Grids*/
	margin: 0px auto;
	width: 1125px;
	height: 750px;
	display:block;
}

#PhotoGrid a img{
	border:none;
}

table.loginbox {
	line-height: 32px;
	text-align:center;
	padding:7px;
	border: 3px solid #fff;
	position:relative;
	top: 15px;
	margin:0px auto;
}

.slideshow{
	width:1125px;
	height:750px;
} 

#thumstrip ul{
	list-style:none;
	display:inline;
}

#thumbstrip li{
	float:left;	
}

#thumbstrip img{
	width:125px;
	height:99px;	
}
/*SlideShow Grids End*/

View attachment 5244

I have attached a .zip of a folder that has a Page.html file in it. If you open that in a browser with Page.html in the testweb folder you will be able to see how it renders. So anyone with Firefox/Safari that is interested in taking a look it would be appreciated.

Thanks
 

Attachments

  • testweb.zip
    8.9 KB · Views: 8
That website was actually very helpful. I have resolved my Firefox issue by making my top and bottom margin for my table to 105px. So my current table margin settings are, margin: 105px auto;. I am still having an issue centering the table in Safari. It is such a weird issue. If I put a paragraph on top of the form with some text the table centers no problem. Weird... I'm sure there is an easy fix somewhere, just gotta keep digging. Thanks for the link.
 
Issue Resolved!! Instead of changing the margins on the table, I changed the margin of the <div> encasing the table. Now everything aligns right across the board. Thanks Office Politics for the links. If I could give you rep I would.
 
Status
Not open for further replies.
Back
Top Bottom