blbraner
08-25-2009, 06:58 AM
Hello-
Please excuse me if this has been asked before, I searched and searched but all I could find is people using tables, and as I am using Divs they don't apply.
But anyways I am new to asp.net and the way I learn best is by diving head first into a project. 20 min in I am stuck lol. I have tried playing around with border collapse and looked at datagride. If someone could point me in the right direction that would be great.
So I have a page I am developing and when I test it in IE7 there is no top border and it looks fine, in FF 3 however, it shows about a 1 inch white bored before any of my divs.
Here is my html
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<div id="header" style="top: auto">
<p> FitBlog</p>
<div id="buttons">
<asp:Button ID="Home" runat="server" Text="Home" CssClass="buttonStyle" />
<asp:Button ID="Articles" runat="server" Text="Articles"
CssClass="buttonStyle" />
<asp:Button ID="Store0" runat="server" Text="Store" CssClass="buttonStyle" />
</div>
</div>
<br />
<br />
<div id="featuredproducts">
<asp:AdRotator ID="AdRotator1" runat="server" DataSourceID="ads" />
<asp:XmlDataSource ID="ads" runat="server" DataFile="~/ads.xml">
</asp:XmlDataSource>
</div>
</div>
</form>
</body>
</html>
Here is my style sheet
#container { width: 1000px; margin: 0 auto; background-color: #fff; border-style:solid; border-width:2px; border-color:#a2a2a2;}
#header{ width: 1000px; height:90px;margin-top:auto; margin-bottom:auto; margin-left:auto; margin-right:auto; border-collapse:collapse; background: #fff url(http://xij23w.bay.livefilestore.com/y1pcbXBXBCJEk7hZ-ltYy_Hqa-xFrUJCUp7RQRgSFs_s_10DL_sKTxN7vAHMttJ2c9uEXL4uxc5mo4FIzwuJiaRzDao4aE4f4hM/background.gif);
}
#header p { font-size: 2.2em; color: #fff; margin-left: Auto; background: transparent; margin-top: auto; line-height: 1.5em;
height: 38px;
width: 107px;
float: left;
}
#buttons{ width: 600px; height:32px;
margin-left:auto; margin-top: 58px;
background: #fff url(http://xij23w.bay.livefilestore.com/y1pY1Rftpd9KYfIi3QaXDO_Xx6rc-yTBP4lBz2NMgYvHLPTGD6UWLGQPe7JAeNOlZubu3WwewfGxXfz7AQyRhweeQ/button25.gif);
}
#featuredproducts { width: 250px; height:250px; margin-left:500px; margin-top: 50px; background-color: #fff;}
.buttonStyle{
color:#a2a2a2;
font-family:verdana;
font-size:84%;
font-weight:bold;
background-color:#ffffff;
height:17px;
width:70px;
margin-top:13px;
margin-left:18px;
border-style:dashed;
border-width:1px;
}
Please excuse me if this has been asked before, I searched and searched but all I could find is people using tables, and as I am using Divs they don't apply.
But anyways I am new to asp.net and the way I learn best is by diving head first into a project. 20 min in I am stuck lol. I have tried playing around with border collapse and looked at datagride. If someone could point me in the right direction that would be great.
So I have a page I am developing and when I test it in IE7 there is no top border and it looks fine, in FF 3 however, it shows about a 1 inch white bored before any of my divs.
Here is my html
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div id="container">
<div id="header" style="top: auto">
<p> FitBlog</p>
<div id="buttons">
<asp:Button ID="Home" runat="server" Text="Home" CssClass="buttonStyle" />
<asp:Button ID="Articles" runat="server" Text="Articles"
CssClass="buttonStyle" />
<asp:Button ID="Store0" runat="server" Text="Store" CssClass="buttonStyle" />
</div>
</div>
<br />
<br />
<div id="featuredproducts">
<asp:AdRotator ID="AdRotator1" runat="server" DataSourceID="ads" />
<asp:XmlDataSource ID="ads" runat="server" DataFile="~/ads.xml">
</asp:XmlDataSource>
</div>
</div>
</form>
</body>
</html>
Here is my style sheet
#container { width: 1000px; margin: 0 auto; background-color: #fff; border-style:solid; border-width:2px; border-color:#a2a2a2;}
#header{ width: 1000px; height:90px;margin-top:auto; margin-bottom:auto; margin-left:auto; margin-right:auto; border-collapse:collapse; background: #fff url(http://xij23w.bay.livefilestore.com/y1pcbXBXBCJEk7hZ-ltYy_Hqa-xFrUJCUp7RQRgSFs_s_10DL_sKTxN7vAHMttJ2c9uEXL4uxc5mo4FIzwuJiaRzDao4aE4f4hM/background.gif);
}
#header p { font-size: 2.2em; color: #fff; margin-left: Auto; background: transparent; margin-top: auto; line-height: 1.5em;
height: 38px;
width: 107px;
float: left;
}
#buttons{ width: 600px; height:32px;
margin-left:auto; margin-top: 58px;
background: #fff url(http://xij23w.bay.livefilestore.com/y1pY1Rftpd9KYfIi3QaXDO_Xx6rc-yTBP4lBz2NMgYvHLPTGD6UWLGQPe7JAeNOlZubu3WwewfGxXfz7AQyRhweeQ/button25.gif);
}
#featuredproducts { width: 250px; height:250px; margin-left:500px; margin-top: 50px; background-color: #fff;}
.buttonStyle{
color:#a2a2a2;
font-family:verdana;
font-size:84%;
font-weight:bold;
background-color:#ffffff;
height:17px;
width:70px;
margin-top:13px;
margin-left:18px;
border-style:dashed;
border-width:1px;
}