Hello all sorry that i am asking my question in this forum i should have asked in microsft simple design template's starters forum. I am using one of the template i.e. simple from here
http://msdn.microsoft.com/en-us/asp.net/aa336613.aspx
I have modified it for a master page as .
<%
@
Master
Language="C#"
AutoEventWireup="true"
CodeFile="Copy of Default.master.cs"
Inherits="_Default" %>
<!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
runat="server">
<title>My
Site</title>
</
head>
<
body>
<form
id="form1"
runat="server">
<!-- TOP NAV -->
<div
id="mainnav-container">
<div
id="mainnav">
<div
class="none">
<a
href="#maincontent">skip to the main content area of this page</a></div>
<ul>
<li><a
href="Default.aspx"
title="Default Page.">Home</a></li>
<li><a
href="#"
title="">About Us</a></li></ul>
</div>
<div
id="mainnav-side">
<ul>
<li>
<asp:LoginView
ID="LoginView1"
runat="server">
<LoggedInTemplate>
Here is the problem . when i try to add a menu control then that menu don't displays as normal but instead in some padding and spacing. i m trying to get through the problem since three days but i couldn't so please help
My advice would be to get IE Developer Toolbar or FireBug (for Firefox). It allows you to inspect the page elements and see the applised css, and where that is declared.
It should point you in the right direction as to what is causing the undesired effects.
hi .. john .. thanks for your reply actually the problem is here #content p, #content-side-2 p, table { margin:0px 0px 20px 0px; } when i set the bottom size of #content p to 1px or other scale then i can able to modify the menu item spacing but still i don't
know why it happens like that as i am not using the paragraph tag in the content div.
Hunzian
Member
165 Points
111 Posts
So i put my question here ... instead in simple design template's forum
Apr 01, 2009 07:03 PM|LINK
Hello all sorry that i am asking my question in this forum i should have asked in microsft simple design template's starters forum. I am using one of the template i.e. simple from here http://msdn.microsoft.com/en-us/asp.net/aa336613.aspx
I have modified it for a master page as .
<%
@ Master Language="C#" AutoEventWireup="true" CodeFile="Copy of Default.master.cs" Inherits="_Default" %> <!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 runat="server"> <title>My Site</title></
head><
body> <form id="form1" runat="server">
<!-- TOP NAV --> <div id="mainnav-container"> <div id="mainnav"> <div class="none"> <a href="#maincontent">skip to the main content area of this page</a></div> <ul> <li><a href="Default.aspx" title="Default Page.">Home</a></li> <li><a href="#" title="">About Us</a></li></ul> </div> <div id="mainnav-side"> <ul> <li> <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate>Your are signed in as:
<asp:LoginName ID="LoginName1" runat="server" /> <asp:LoginStatus ID="LoginStatus" runat="server" /> </LoggedInTemplate> <AnonymousTemplate>You are not logged in:
<asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="RedirectToLoginPage" /> <a href="Login.aspx"></a> <a href="Join.aspx" title="Please join AKESP Intranet.">Join</a> </AnonymousTemplate> </asp:LoginView> </li> </ul> </div> <div class="clear"> </div> </div>
<!-- SITE NAME & SLOGAN --> <div id="header"> <a href="#" title="abc">my</a> site title <div id="slogan"> <a href="#" title="."><span style="color: #000000">logo<br /> <br /> </span>Home</a> / <a href="#" title=".">About Us</a> / Title<div id="breadcrumb-side"> </div> </div> </div> <div id="content-container">
<!-- SIDE COLUMN LEFT--> <div id="content-side"> <%--<ul class="link-list-vertical"><li><a href="http://forums.asp.net/AddPost.aspx?ForumID=1003#" title=".">
About Us</a> </li>
</ul>--%>Menu
<br /> <asp:Menu CssClass="menu" ID="Menu1" runat="server"> <Items> <asp:MenuItem Text="New Item" NavigateUrl="~/test.aspx" Value="Go to test page"></asp:MenuItem> <asp:MenuItem Text="New Item" NavigateUrl="~/default2.aspx" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="New Item" Value="New Item"></asp:MenuItem> </Items> </asp:Menu> </div>
<!-- MAIN CENTER COLUMN --> <div id="content"> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolderMain" runat="server"> </asp:ContentPlaceHolder> </div> <!-- FOOTER --> <div id="footer"> <p>My site
</p> </div> </div> <!-- CONTENT SIDE RIGHT COLUMN --> <div id="content-side-2"> </div> </div> </form></
body></
html>The CSS file is
/******************
HTML Tags
******************/
body { font-family:Geneva, Arial, Helvetica, sans-serif; color:#666666; margin:15px 40px; background: #C7C7CF url(bg-main.gif) repeat-x; font-size:.72em;}
#content p, #content-side-2 p, table { margin:0px 0px 20px 0px;}
#content-side-2 img { border:none;}
#breadcrumb-side label { display:none}
/******************
FORM STYLES
******************/
#content-container form { margin:20px 0px; padding:0px 0px 0px 0px;}
#content-container fieldset { margin:10px 0px 20px 0px; padding:0px 10px 10px 20px;}
/* a nested fieldset */
#content-container fieldset fieldset { margin:15px 0px 5px 0px; padding:0px 5px 5px 5px;}
#content-container legend { margin-bottom:0px; padding:0px 10px 5px 5px; color:#666666; font-weight:bold;}
/* a nested legend */
#content-container fieldset fieldset legend { margin-bottom:0px; padding:0px; font-weight:normal;}
#content-container label { display:block; padding-top:8px;}
#breadcrumb-side form { margin:0px; padding:0px; text-align:right;}
#breadcrumb-side form fieldset { margin:0px; padding:0px; border:none;}
#breadcrumb-side form legend { display:none;}
/******************
LINKS
******************/
/* LINK VISTED HOVER ACTIVE selectors must remain in this order to work */
a:link { color:#0000FF;}
a:visited { color:#0099CC;}
a:hover { color:#000099; text-decoration:none;}
a:active { color:#669966;}
/* LINK VISTED HOVER ACTIVE selectors must remain in this order to work */
#mainnav-container a:link { color:#0000FF;}
#mainnav-container a:visited { color:#0000FF;}
#mainnav-container a:hover { color:#000099; text-decoration:none;}
#mainnav-container a:active { color:#669966;}
/* All link states are selected with an "a" */
#header a { color:#FFFFFF}
#breadcrumb-container a { color:#0000FF;}
/******************
HEADINGS
******************/
h1 { font-size:1.6em; padding:0; margin:0 0 10px 0;}
h2 { font-size:1.1em;}
h3 {font-size:1.4em;}
h4 {font-size:1.1em;}
h5 {font-size:.9em;}
h6 { font-size:.8em;}
#three-column-container h2 { margin:0px 0px 10px 0px; padding:0px;}
/******************
Layout Divs
******************/
#mainnav-container { padding:8px 10px; border-bottom:2px solid #7F7F7F; border-right:1px solid #7F7F7F; border-left:1px solid #EDEDED; margin-bottom:1px; background: #FFFFFF url(bg-topnav.gif) repeat-x;}
#mainnav { float:left; width:70%;}
#mainnav-side { float:right; width:30%; text-align:right;}
#header { margin-bottom:1px; color:#FFFFFF; padding:10px 10px 10px 10px; border-bottom:2px solid #7F7F7F; border-right:1px solid #7F7F7F; height:50px; min-height:50px; background: #16527D url(bg-header.gif) repeat-x; font-size:1.8em; font-weight:bold;}
#header a { text-decoration:none; color:#FFFFFF;}
#slogan { font-size:.68em; margin:0px; font-weight:normal; padding-top:7px;}
#breadcrumb-container { border-bottom:2px solid #7F7F7F; border-right:1px solid #7F7F7F; border-left:1px solid #EDEDED; margin-bottom:1px; background: #FFFFFF url(bg-topnav.gif) repeat-x; padding:6px 0;}
#breadcrumb { float:left; padding:0 10px;}
#breadcrumb-side { float:right; padding:0 10px;}
#content-container { background-color:#F6F6F6; border-top:1px solid #CBCBCB; border-right:1px solid #7F7F7F; border-bottom:2px solid #7F7F7F; border-left:1px solid #CBCBCB; padding:0px; margin:0px; position:relative;}
#content-side { position:absolute; top:0px; left:0px; width:150px;padding:10px;}
#content-side menu{ position:fixed; top:0px; left:0px; padding:0px 0px 0px 0px;}
#content-side-2 { position:absolute; top:0; right:0px; width:120px; padding:10px;}
#content { padding:10px 10px 0px 10px; margin:0px 140px 0px 171px; height:100%; background-color:#FFFFFF; border-left:1px dashed #D0D0BF; border-right:1px dashed #D0D0BF;}
#three-column-container { width:100%; margin:10px 0px; text-align:justify;}
#three-column-left { float:left; width:30%}
#three-column-right { float:right; width:30%}
#three-column-middle { width:30%; margin:0px 32% 0px 35%}
#footer { margin-top:80px; padding:20px 10px 0px 10px; border-top:1px solid #7F7F7F; text-align:center; clear:both; background: #FFFFFF url(bg-topnav.gif) repeat-x; font-size:.95em;}
/******************
MENU ITEMS
******************/
#mainnav-container ul { margin:0px; padding:0px;}
#mainnav-container li { padding:0px; list-style:none; display:inline; margin:5px 10px 5px 0px;}
#mainnav-side li { padding:0px; margin:5px 0px 5px 10px;}
/******************
LISTS - IN THE CONTENT DIV
******************/
#content ul.list, #content ul.link-list-vertical { margin:0px 0px 15px 15px; padding:0px;}
#content ul.list li { list-style:none; padding:2px 0px 2px 12px; margin:0px; background: url(bullet.gif) no-repeat; background-position: 0 50%;}
#content ul.link-list-vertical li { list-style:none; margin:0px; padding:2px 0px;}
#content ul.link-list-vertical li a:link { padding:2px 0px 2px 12px; background: url(bullet-link.gif) no-repeat; background-position: 0 50%;}
#content ul.link-list-vertical li a:visited { padding:2px 0px 2px 12px; background: url(bullet-link-visited.gif) no-repeat; background-position: 0 50%;}
#content ul.link-list-vertical li a:hover { padding:2px 0px 2px 12px; background: url(bullet-link-hover.gif) no-repeat; background-position: 0 50%;}
#content ul.link-list-vertical li a:active { padding:2px 0px 2px 12px; background: url(bullet-link-active.gif) no-repeat; background-position: 0 50%;}
/******************
LISTS - IN THE RIGHT OR LEFT COLUMNS
******************/
#content-side-2
ul.list, #content-side-2 ul.link-list-vertical,/*#content-side ul.list, #content-side ul.link-list-vertical {
margin:0px 0px 15px 0px;
padding:0px;
}
*/
#content-side-2
ul.list li,/*
#content-side ul.list li {
list-style:none;
padding:2px 0px 2px 12px;
margin:0px;
background: url(bullet-right.gif) no-repeat;
background-position: 0 50%;
}
*/
#content-side-2
ul.link-list-vertical li,/*
#content-side ul.link-list-vertical li {
list-style:none;
margin:0px;
padding:2px 0px;
}
*/
#content-side-2
ul.link-list-vertical li a:link,/*
#content-side ul.link-list-vertical li a:link {
padding:2px 0px 2px 12px;
background: url(bullet-link.gif) no-repeat;
background-position: 0 50%;
}
*/
#content-side-2
ul.link-list-vertical li a:visited,/*
#content-side ul.link-list-vertical li a:visited {
padding:2px 0px 2px 12px;
background: url(bullet-link-visited.gif) no-repeat;
background-position: 0 50%;
}
*/
#content-side-2
ul.link-list-vertical li a:hover,/*
#content-side ul.link-list-vertical li a:hover {
padding:2px 0px 2px 12px;
background: url(bullet-link-hover.gif) no-repeat;
background-position: 0 50%;
}
*/
#content-side-2
ul.link-list-vertical li a:active,/*
#content-side ul.link-list-vertical li a:active {
padding:2px 0px 2px 12px;
background: url(bullet-link-active.gif) no-repeat;
background-position: 0 50%;
}
*/
/******************
TABLE STYLES
******************/
.table { width:100%; border:1px solid #D0D0BF;border-collapse:collapse;}
.table td { padding:10px;}
thead th, tfoot th { background-color:#F6F6F6; border-bottom:2px solid #D0D0BF; border-top:2px solid #D0D0BF; padding:10px; font-weight:normal; font-variant:small-caps;}
/******************
CLASSES
******************/
.button-big { margin-top:8px;}
img.photobig, img.photosmall { border-top:1px solid #CCCCCC; border-right:1px solid #999999; border-bottom:1px solid #999999; border-left:1px solid #CCCCCC; background: #E0E0E0 url(background_table_04.gif) repeat-x; padding:8px;}
img.photosmall { margin-right:10px; margin-bottom:2px;float: left;}
.searchbox { height:13px; margin:0px; padding:0px; width:8em; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:10px; color:#666666;}
.button-search { height:18px; margin:0px; padding:0px 0px 0px 0px; border-top:1px solid #CCCCCC; border-right:1px solid #999999; border-bottom:1px solid #999999; border-left:1px solid #CCCCCC; background: url(bg-button-search.gif) repeat-x; font-size:10px; font-family:Verdana, Arial, Helvetica, sans-serif; color:#0000FF;}
.none { display:none;}
.clear {clear:both;}
Here is the problem . when i try to add a menu control then that menu don't displays as normal but instead in some padding and spacing. i m trying to get through the problem since three days but i couldn't so please help
JohnAClee
Participant
1523 Points
265 Posts
Re: So i put my question here ... instead in simple design template's forum
Apr 02, 2009 08:32 AM|LINK
Hi,
My advice would be to get IE Developer Toolbar or FireBug (for Firefox). It allows you to inspect the page elements and see the applised css, and where that is declared.
It should point you in the right direction as to what is causing the undesired effects.
JC
Hunzian
Member
165 Points
111 Posts
Re: So i put my question here ... instead in simple design template's forum
Apr 02, 2009 09:57 AM|LINK