ASP.Net Treeview CSS not working - asp.net

I am trying to change the CSS style and color of the Treeview nodes in ASP.Net web page. I can change the font-size but I couldn't manage to change the color of the nodes. Could you please help me?
<style type="text/css">
.treeNode {
color: #070707;
font: 14px Arial, Sans-Serif;
}
.rootNode {
font-size: 18px;
width: 100%;
color: #f00;
}
.leafNode {
padding: 4px;
color: #070707;
}
.selectNode {
font-weight: bold;
}
</style>
<asp:TreeView ID="tvData" runat="server" OnSelectedNodeChanged="tvData_SelectedNodeChanged" ShowLines="True">
<LeafNodeStyle CssClass="leafNode" />
<NodeStyle CssClass="treeNode" />
<RootNodeStyle CssClass="rootNode" />
<SelectedNodeStyle CssClass="selectNode" />
<Nodes>
<asp:TreeNode Text="Root" Value="0">
<asp:TreeNode Text="Products">
<asp:TreeNode Text="First Product" />
<asp:TreeNode Text="Second Product" />
</asp:TreeNode>
</asp:TreeNode>
</Nodes>
</asp:TreeView>

apply this bit of css and you will get an idea.
<style type="text/css">
.treeNode
{
color: #070707;
font: 14px Arial, Sans-Serif;
}
.rootNode
{
font-size: 18px;
padding:5px;
color: red;
background-color:#DDD;
border-radius:10px;
}
.leafNode
{
padding: 4px;
color: #070707;
background-color:Silver;
}
.selectNode
{
font-weight: bold;
background-color:Black;
color:White;
border-radius:5px;
}
</style>
thank you

Related

styling issue in Chrome with datalist

I am having styling issue with products loaded in datalist control in Chrome.
While everything looks ok in FF, Chrome gives me weird styling.
Here are the screenshots:
FF: http://gyazo.com/214fcfafbfb91e17ea1f084af84e61e4.png?1341955023
Chrome: http://gyazo.com/4459dc38dc01a18f62780392d8fb3625.png?1341955739
Here is the html markup:
<div class="product-grid">
<asp:DataList ID="dlCatalog" runat="server" RepeatColumns="2" RepeatDirection="Horizontal"
RepeatLayout="Table" ItemStyle-CssClass="item-box">
<ItemTemplate>
<nopCommerce:ProductBox1 ID="ctrlProductBox" Product='<%# Container.DataItem %>'
runat="server" />
</ItemTemplate>
</asp:DataList>
</div>
Here is the CSS:
.product-grid { margin-bottom: 15px; width: 586px; text-align: center; margin-left: -10px; }
.product-grid .item-box { text-align: center; vertical-align: top; padding: 10px 11px 60px 11px; }
.product-grid .product-item { text-align: center; margin: 10px 5px 10px 5px; width: 250px; background: url('images/prod_grid_box_bg.gif') no-repeat 0 100%; }
.product-grid .product-item .product-title { font-weight: bold; font-size: 12px; background: url('images/deal_box_hl.gif') no-repeat 0 0; padding-left: 10px; }
.product-grid .product-item .product-title a { background: url('images/deal_box_hr.gif') no-repeat 100% 0; display: block; height: 2em; line-height: 1.3em; overflow: hidden hidden; padding: 4px 10px 8px 0px; }
.product-grid .product-item .picture { text-align: center; margin-top: 10px; }
.product-grid .product-item .description { margin: 5px 5px 0 5px; text-align: center; padding: 10px 5px 10px 5px; border-top: solid 1px #e3e3e3; color: #555; height: 50px; }
.product-grid .product-item .add-info { vertical-align: bottom; text-align: right; width: 250px; height: 85px; position: relative; }
.product-grid .product-item .add-info .prices { text-align: right; vertical-align: middle; position: absolute; bottom: 15px; right: 10px; }
.product-grid .product-item .add-info .buttons { vertical-align: middle; position: absolute; bottom: 15px; left: 10px; text-align: left; }
.product-grid .product-item .add-info .prices .productPrice { color: green; }
.product-grid .product-item .add-info .prices .oldproductPrice { color: Red; text-decoration: line-through; }
PRODUCT BOX CODE ADDED:
<%# Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Modules.ProductBox1Control"
CodeBehind="ProductBox1.ascx.cs" %>
<%# Register TagPrefix="nopCommerce" TagName="ProductPrice2" Src="~/Modules/ProductPrice2.ascx" %>
<script type="text/javascript" language="javascript" src="../Scripts/jquery.expander.js"></script>
<script type="text/javascript">
// you can override default options globally, so they apply to every .expander() call
//$.expander.defaults.slicePoint = 50;
$(document).ready(function () {
// simple example, using all default options unless overridden globally
//$('div.expandable h3').expander();
// *** OR ***
// override default options (also overrides global overrides)
$('div.expandable h3').expander({
slicePoint: 50, // default is 100
expandPrefix: '.....', // default is '... '
expandText: '>>', // default is 'read more'
collapseTimer: 5000, // re-collapses after 5 seconds; default is 0, so no re-collapsing
userCollapseText: '<<' // default is 'read less'
});
});
</script>
<%--<div class="product-item">
<h2 class="product-title">
<asp:HyperLink ID="hlProduct" runat="server" />
</h2>
<div class="picture">
<asp:HyperLink ID="hlImageLink" runat="server" />
</div>
<div class="description">
<asp:Literal runat="server" ID="lShortDescription"></asp:Literal>
</div>
<div class="add-info">
<div class="prices">
<nopCommerce:ProductPrice2 ID="ctrlProductPrice" runat="server" ProductId='<%#Eval("ProductId") %>' />
</div>
<div class="buttons">
<asp:Button runat="server" ID="btnProductDetails" OnCommand="btnProductDetails_Click"
Text="<% $NopResources:Products.ProductDetails %>" ValidationGroup="ProductDetails"
CommandArgument='<%# Eval("ProductId") %>' CssClass="productgridproductdetailbutton" /><br />
<asp:Button runat="server" ID="btnAddToCart" OnCommand="btnAddToCart_Click" Text="<% $NopResources:Products.AddToCart %>"
ValidationGroup="ProductDetails" CommandArgument='<%# Eval("ProductId") %>' CssClass="productgridaddtocartbutton" />
</div>
</div>
</div>--%>
<div class="pblock">
<div class="borderProd">
<div class="expandable">
<h3>
<asp:HyperLink ID="hlProduct" runat="server" />
</h3>
</div>
<asp:Literal runat="server" ID="lShortDescription" Visible="false"></asp:Literal>
</div>
<div class="img">
<a id="hlImageLink" runat="server">
<img id="hlImage" runat="server" style="max-width:170px;max-height:120px"/>
</a>
<div class="body">
</div>
<div class="body">
<nopCommerce:ProductPrice2 ID="ctrlProductPrice" runat="server" ProductId='<%#Eval("ProductId") %>' />
</div>
<asp:Label ID="labUniversal" runat="server" ForeColor="Blue" Text=""></asp:Label>
</div>
</div>
I fixed the problem by setting the height of the item-box to 275px.
Thanks everyone for your help.

adjusting ajax asp accordion sizes

I'm very unfamilar with accordion and exactly how to use them, i'm trying to adjust the width of the accordion, how/what is the easier way to do that, i'm using the sample css that came with it, but i do not see any width adjustment.
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="Server" />
<asp:Accordion ID="MyAccordion" runat="server"
SelectedIndex="0"
HeaderCssClass="accordionHeader"
ContentCssClass="accordionContent"
FadeTransitions="true"
FramesPerSecond="40"
TransitionDuration="250"
AutoSize="None">
<Panes>
<asp:AccordionPane ID = "AccordionPane1" runat = "server">
<Header>
Section 1
</Header>
<Content>
<p>Thi</p>
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID = "AccordionPane2" runat = "server">
<Header>
Section 2
</Header>
<Content>
<p>Joe</p>
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID = "AccordionPane3" runat = "server">
<Header>
Section 3
</Header>
<Content>
<p>So keep yoow Micro</p>
</Content>
</asp:AccordionPane>
<asp:AccordionPane ID = "AccordionPane4" runat = "server">
<Header>
Section 4
</Header>
<Content>
<p>>test</p>
</Content>
</asp:AccordionPane>
</Panes>
</asp:Accordion>
.accordionHeader
{
border: 1px solid #2F4F4F;
color: white;
background-color: #2E4d7B;
font-family: Arial, Sans-Serif;
font-size: 12px;
font-weight: bold;
padding: 5px;
margin-top: 5px;
cursor: pointer;
}
.accordionContent
{
background-color: #D3DEEF;
border: 1px dashed #2F4F4F;
border-top: none;
padding: 5px;
padding-top: 10px;
}
.accordionLink
{
background-color: #D3DEEF;
color: white;
}
.watermark {
background: #FFAAFF;
}
.popupControl {
background-color:#AAD4FF;
position:absolute;
visibility:hidden;
border-style:solid;
border-color: Black;
border-width: 2px;
}
.modalBackground {
background-color:Gray;
filter:alpha(opacity=70);
opacity:0.7;
}
.modalPopup {
background-color:#ffffdd;
border-width:3px;
border-style:solid;
border-color:Gray;
padding:3px;
width:250px;
}
.sampleStyleA {
background-color:#FFF;
}
.sampleStyleB {
background-color:#FFF;
font-family:monospace;
font-size:10pt;
font-weight:bold;
}
.sampleStyleC {
background-color:#ddffdd;
font-family:sans-serif;
font-size:10pt;
font-style:italic;
}
.sampleStyleD {
background-color:Blue;
color:White;
font-family:Arial;
font-size:10pt;
}
You could create a container for the accordion and by giving it a width that will also set the accordion's width. Something like:
<div id="divAccordionContainer" style="width:500px">
<ajaxToolkit:Accordion ID="MyAccordion" runat="Server">
...
</ajaxToolkit:Accordion>
</div>

Why can't I target the links in this class?

I have this class:
.search-modal-navigation-link {
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFF;
height: 32px;
font-size: 12px;
text-align: center;
float: left;
margin-right: 22px;
}
And I tried targeting all links in this class so I did this:
a.search-modal-navigation-link:link {
text-decoration: underline;
color: red;
}
and I get nothing, why is this? Thank you :))!
Edit: My Html
<div class="search-modal-navigation-tab">
<div class="search-modal-navigation-link"><a href="#">
<img src="img/icons/01-passive.png" width="20" height="21" border="0" /><BR />
All Events</a></div>
<div class="search-modal-navigation-link">
<img src="img/icons/01-passive.png" width="20" height="21" /><BR />
All Events</div>
</div>
Your selector isn't looking for links in an element with that class, it's looking for links with that class. You need to change it to this:
.search-modal-navigation-link a:link {
text-decoration: underline;
color: red;
}
How about
.search-modal-navigation-link a {
text-decoration: underline;
color: red;
}

Strange extra padding in chrome using standard VS 2010 template

I have the following code slightly modified from the Visual Studio 2010 css template. My problem is I'm getting extra top padding/margin of approx 10px in the parent div's of the menu controls in chrome only. It's fine in IE. Whats going on here?
CSS
/* CSS RESET
----------------------------------------------------------*/
*{margin:0;padding:0;}
/* DEFAULTS
----------------------------------------------------------*/
body
{
background: #b6b7bc;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
}
a:link, a:visited
{
color: #034af3;
}
a:hover
{
color: #1d60ff;
text-decoration: none;
}
a:active
{
color: #034af3;
}
p
{
margin-bottom: 10px;
line-height: 1.6em;
}
/* HEADINGS
----------------------------------------------------------*/
h1, h2, h3, h4, h5, h6
{
font-size: 1.5em;
color: #666666;
/*font-variant: small-caps;*/
text-transform: none;
font-weight: 200;
margin-bottom: 0px;
}
h1
{
font-size: 1.6em;
padding-bottom: 0px;
margin-bottom: 0px;
}
h2
{
font-size: 1.5em;
font-weight: 600;
}
h3
{
font-size: 1.2em;
}
h4
{
font-size: 1.1em;
}
h5, h6
{
font-size: 1em;
}
/* this rule styles <h1> and <h2> tags that are the
first child of the left and right table columns */
.rightColumn > h1, .rightColumn > h2, .leftColumn > h1, .leftColumn > h2
{
margin-top: 0px;
}
/* PRIMARY LAYOUT ELEMENTS
----------------------------------------------------------*/
.page
{
width: 960px;
background-color: #fff;
margin: 20px auto 0px auto;
border: 1px solid #496077;
}
.header
{
position: relative;
margin: 0px;
padding: 0px;
background: #4b6c9e;
width: 100%;
}
.header h1
{
font-weight: 700;
margin: 0px;
padding: 0px 0px 0px 20px;
color: #f9f9f9;
border: none;
line-height: 2em;
font-size: 2em;
}
.main
{
min-height: 420px;
}
.mainContent
{
float:left;
width:790px;
padding-left:8px;
}
.leftCol
{
padding: 6px 0px;
margin: 12px 8px 8px 8px;
width: 200px;
min-height: 200px;
}
.footer
{
color: #4e5766;
padding: 8px 0px 0px 0px;
margin: 0px auto;
text-align: center;
line-height: normal;
}
/* TAB MENU
----------------------------------------------------------*/
div.hideSkiplink
{
}
div.topMenuContainer
{
background-color:#3a4f63;
width:100%;
}
div.menu
{
padding: 0px 0px 4px 8px;
}
div.menu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.menu ul li a, div.menu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
margin:0px;
}
div.menu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
margin:0px;
}
div.menu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
margin:0px;
}
/* LEFT MENU
----------------------------------------------------------*/
div.leftMenuContainer
{
background-color:#3a4f63;
width:160px;
float:left;
min-height: 420px;
}
div.leftMenu
{
padding: 4px 0px 4px 8px;
}
div.leftMenu ul
{
list-style: none;
margin: 0px;
padding: 0px;
width: auto;
}
div.leftMenu ul li a, div.leftMenu ul li a:visited
{
background-color: #465c71;
border: 1px #4e667d solid;
color: #dde4ec;
display: block;
line-height: 1.35em;
padding: 4px 20px;
text-decoration: none;
white-space: nowrap;
}
div.leftMenu ul li a:hover
{
background-color: #bfcbd6;
color: #465c71;
text-decoration: none;
}
div.leftMenu ul li a:active
{
background-color: #465c71;
color: #cfdbe6;
text-decoration: none;
}
/* FORM ELEMENTS
----------------------------------------------------------*/
fieldset
{
margin: 1em 0px;
padding: 1em;
border: 1px solid #ccc;
}
fieldset p
{
margin: 2px 12px 10px 10px;
}
fieldset.login label, fieldset.register label, fieldset.changePassword label
{
display: block;
}
fieldset label.inline
{
display: inline;
}
legend
{
font-size: 1.1em;
font-weight: 600;
padding: 2px 4px 8px 4px;
}
input.textEntry
{
width: 320px;
border: 1px solid #ccc;
}
input.passwordEntry
{
width: 320px;
border: 1px solid #ccc;
}
div.accountInfo
{
width: 42%;
}
/* MISC
----------------------------------------------------------*/
.clear
{
clear: both;
}
.title
{
display: block;
float: left;
text-align: left;
width: auto;
}
.loginDisplay
{
font-size: 1.1em;
display: block;
text-align: right;
padding: 10px;
color: White;
}
.loginDisplay a:link
{
color: white;
}
.loginDisplay a:visited
{
color: white;
}
.loginDisplay a:hover
{
color: white;
}
.failureNotification
{
font-size: 1.2em;
color: Red;
}
.bold
{
font-weight: bold;
}
.submitButton
{
text-align: right;
padding-right: 10px;
}
ASPX
<%# Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="MTGames.SiteMaster" %>
<!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" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div class="page">
<div class="header">
<div class="title">
<h1>
My Site
</h1>
</div>
<div class="loginDisplay">
<asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
<AnonymousTemplate>
[ Log In ]
</AnonymousTemplate>
<LoggedInTemplate>
Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
[ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
</LoggedInTemplate>
</asp:LoginView>
</div>
<div class="clear topMenuContainer hideSkiplink">
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/Content/SavingsClub.aspx" Text="Savings Club"/>
<asp:MenuItem NavigateUrl="~/Content/BuySellExchange.aspx" Text="Buy Sell Exchange"/>
<asp:MenuItem NavigateUrl="~/Content/Photos.aspx" Text="Photos"/>
<asp:MenuItem NavigateUrl="~/Content/ContactUs.aspx" Text="Contact Us"/>
</Items>
</asp:Menu>
</div>
</div>
<div class="main">
<div class="clear leftMenuContainer hideSkiplink">
<asp:Menu ID="LeftNavMenu" runat="server" CssClass="leftMenu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Vertical">
<Items>
<asp:MenuItem NavigateUrl="~/Default.aspx" Text="Home"/>
<asp:MenuItem NavigateUrl="~/Content/SavingsClub.aspx" Text="Savings Club"/>
<asp:MenuItem NavigateUrl="~/Content/BuySellExchange.aspx" Text="Buy Sell Exchange"/>
<asp:MenuItem NavigateUrl="~/Content/Photos.aspx" Text="Photos"/>
<asp:MenuItem NavigateUrl="~/Content/ContactUs.aspx" Text="Contact Us"/>
</Items>
</asp:Menu>
</div>
<div class="mainContent">
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
</form>
</body>
</html>
HTML Output as requested...
<!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" xml:lang="en">
<head><title>
MT Games LTD - Home
</title><link href="Styles/Site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form method="post" action="default.aspx" id="ctl01">
<div class="aspNetHidden">
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NDU2MTA1MmRkLDnBf84MIbFVqD400rg+QLHpOjYA01q5saPk2YvtQR8=" />
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['ctl01'];
if (!theForm) {
theForm = document.ctl01;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/WebResource.axd?d=e5ggu92Xslxua3kL9nz8UEofZFOqESloGE_Cj0acdYupGWiZv6mA-7j9gl1qZyu-Y2_dOyT682uBRYryo2Uk1qSiI78I-2pgTagWwnubNEw1&t=634220066968172593" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=vohUtv47l55JX-_SEfdvXX1rc3wSNSZ9IvoYKmaPF-0UDpWX_2VTYUNkLm7PO0jeF56__8cFVok93Md1-jOV27X9JbBIl3KWaifSkCmwKvk3Dgj6N7xFweVjQK5drnmfItGQ0AEWh8sbhd1vBIHoeA2&t=6df0ad7a" type="text/javascript"></script>
<script src="/ScriptResource.axd?d=r99416_-lUTvcLqe0vx1emg4MR_VAgLHwDco9wPW98QgH03QnH7DRQkA0mx2FQZ5VppBb7JYwOM3gTOTGs8r_j6W0xaQKJo8xTEbbaYeAM9WE90s6Tp-uohjL07JySbKxyIzs5kMm3DtV3kkrbMsJmAIQGWT7gReSVSkk-vQtlSm8AGzdfW36I9zdQwR-z_60&t=2610f696" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
if (typeof(Sys) === 'undefined') throw new Error('ASP.NET Ajax client-side framework failed to load.');
//]]>
</script>
<script src="/ScriptResource.axd?d=otDNNytXiqv-illCGIud3TULs9-clnOJc4rCdck1L_NgOC9rQIuScBEulatBNXXmu3mRYEY-IBlraYglBRImGj3VFqJMq5q1D8augYHxad15XoOHRiy4KA8ZCRoOmHQsaZmo-EGDbQ833sK4G1QpyLm1dIkybv0r0OSMKV_PkG29XB8AWUm5gsLlNrC2G67K0&t=2610f696" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ScrptManager', 'ctl01', [], [], [], 90, 'ctl00');
//]]>
</script>
<div class="page">
<div class="header">
<div class="title">
<h1>
MT Games LTD
</h1>
</div>
<div class="loginDisplay">
[ Log In ]
</div>
<div class="clear topMenuContainer hideSkiplink">
<img alt="Skip Navigation Links" src="/WebResource.axd?d=RbjyXrlFzBsX7QUn2iOIQq1pniIyextRs7F3B_K9nBzVv8mpeirENaJZ5ab4b0VRcLOj22AZ4sBUNuu-Qa1e4ZDAX4puffSVufxEEatcG2U1&t=634220066968172593" width="0" height="0" style="border-width:0px;" /><div class="menu" id="NavigationMenu">
<ul class="level1">
<li><a class="level1" href="Default.aspx">Home</a></li><li><a class="level1" href="Content/SavingsClub.aspx">Savings Club</a></li><li><a class="level1" href="Content/BuySellExchange.aspx">Buy Sell Exchange</a></li><li><a class="level1" href="Content/Photos.aspx">Photos</a></li><li><a class="level1" href="Content/ContactUs.aspx">Contact Us</a></li>
</ul>
</div><a id="NavigationMenu_SkipLink"></a>
</div>
</div>
<div class="main">
<div class="clear leftMenuContainer hideSkiplink">
<img alt="Skip Navigation Links" src="/WebResource.axd?d=RbjyXrlFzBsX7QUn2iOIQq1pniIyextRs7F3B_K9nBzVv8mpeirENaJZ5ab4b0VRcLOj22AZ4sBUNuu-Qa1e4ZDAX4puffSVufxEEatcG2U1&t=634220066968172593" width="0" height="0" style="border-width:0px;" /><div class="leftMenu" id="LeftNavMenu">
<ul class="level1">
<li><a class="level1" href="Content/Consoles.aspx">Consoles, Games & Accessories</a></li><li><a class="level1" href="Content/DVDBRMusic.aspx">DVD, BLUERAY & Music</a></li><li><a class="level1" href="Content/Collectables.aspx">Collectables & Figurines</a></li><li><a class="level1" href="Content/Guns.aspx">Guns</a></li><li><a class="level1" href="Content/Knives.aspx">Knives</a></li><li><a class="level1" href="Content/Archery.aspx">Archery</a></li><li><a class="level1" href="Content/Other.aspx">Other Products</a></li>
</ul>
</div><a id="LeftNavMenu_SkipLink"></a>
</div>
<div class="mainContent">
<p>
To learn more about ASP.NET visit www.asp.net.
</p>
<p>
You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&clcid=0x409"
title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
</p>
</div>
</div>
<div class="clear">
</div>
</div>
<div class="footer">
</div>
<script type='text/javascript'>new Sys.WebForms.Menu({ element: 'NavigationMenu', disappearAfter: 500, orientation: 'horizontal', tabIndex: 0, disabled: false });</script><script type='text/javascript'>new Sys.WebForms.Menu({ element: 'LeftNavMenu', disappearAfter: 500, orientation: 'vertical', tabIndex: 0, disabled: false });</script></form>
</body>
</html>
Now on jsfiddle http://jsfiddle.net/hhdTe/1/ although the format is a but screwed up on there - the problem still exists. Run it in IE & Chrome and you'll see the extra padding above the menus
Set SkipLinkText="" in the menu.
<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" IncludeStyleBlock="false" Orientation="Horizontal" SkipLinkText="">
The padding will vanish.
Both Safari and Chrome have a problem with this. It's accessibility feature in the Menu Control.
If you interested in more information:
http://sim4all.com/blogging/?p=47
Just a follow-up on this. using the above methods to fix this issue is not recommended. There is a very good reason for that image being there. It is an accessibility feature to allow people with screen readers to skip navigation menus and move directly to the content.
See explanation here: http://webaim.org/techniques/skipnav/
Using display: none; hides the link from screen readers as well as visual users, rendering it useless. Changing the link text will mean that people that are looking for it will not be able to find it.
The recommended approach is to leave the image visible, yet move it off the screen. That way it cannot be seen, but screen readers will still find it. Add the below CSS to acheive this:
img[alt='Skip Navigation Links'] {
position:absolute;
left:-10000px;
top:auto;
width:1px;
height:1px;
overflow:hidden;}
That will fix the issue, without affecting accessibility.
It's the image inside the 'skip links', not sure why you need it. Try this in your CSS:
img[alt='Skip Navigation Links'] {
display: none;
}

vertical and horizontal scrolls not working

I have a master page which is using the style sheet..
My problem is that my vertical scrollbar does not work and horizontal scrollbar is not showing when i restore down the page.
here is my .aspx code..
<%# Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!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 id="Head1" runat="server">
<title>test</title>
<meta name="generator" content="HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<link href="NewFolder1/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.style1
{
font-size: medium;
font-weight: bold;
}
.style2
{
text-align: left;
}
</style>
</head>
<body bgcolor="#6794cb" >
<form id="form2" runat="server"
style="background-color: #6794CB;padding-bottom:1%; padding-top: 2%; width:100%; height:100%;">
<div id="container" style="visibility: visible;">
<div id="header">
<div class="style2">
<asp:TextBox ID="TextBox1" runat="server" BorderColor="#000099" BorderWidth="2px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Search" BackColor="#ADC6C9"
BorderColor="#CCCCCC" BorderStyle="Outset" />
<asp:HyperLink ID="HyperLink1" runat="server">corp\tbruschi</asp:HyperLink>
<asp:HyperLink ID="HyperLink2" runat="server">Settings</asp:HyperLink>
<asp:HyperLink ID="HyperLink3" runat="server">Help</asp:HyperLink>
<asp:HyperLink ID="HyperLink4" runat="server">LogOff</asp:HyperLink>
<br />
<br />
<span class="style1"><br />
</span><br />
<asp:Panel ID="Panel1" runat="server" Width="100%">
<hr style="padding: 1px; background-color: #000000" />
</asp:Panel>
<br />
</div>
</div>
<!-- end header -->
<div id="left">
<asp:Panel ID="Panel3" runat="server" Height="100%" ScrollBars="Auto"
Width="100%">
<p>
</p>
<br />
<asp:TreeView ID="TreeView2" runat="server" OnUnload="TreeViewMain_Unload"
ontreenodepopulate="TreeView2_TreeNodePopulate"
onselectednodechanged="TreeView2_SelectedNodeChanged">
<Nodes>
<asp:TreeNode PopulateOnDemand="True" Text="Machine Groups"
Value="Machine Groups"></asp:TreeNode>
</Nodes>
</asp:TreeView>
<br />
<asp:TreeView ID="TreeView3" runat="server" OnUnload="TreeView3_Unload"
ontreenodepopulate="TreeView3_TreeNodePopulate"
onselectednodechanged="TreeView3_SelectedNodeChanged">
<Nodes>
<asp:TreeNode PopulateOnDemand="True" Text="Policies"
Value="Policies"></asp:TreeNode>
</Nodes>
</asp:TreeView>
<br />
</asp:Panel>
</div>
<div id="content-wrapper">
<div id="content-inner">
<!-- end left division -->
<div id="main">
<asp:ContentPlaceHolder id="ContentPlaceHolder2" runat="server">
</asp:ContentPlaceHolder>
</div>
</div>
</div> <!-- end footer -->
</div>
</form>
</body>
</html>
**
And here is my Css file code..
body
{
font-family: arial, verdana, helvetica, sans-serif;
font-size: 12px;
cursor: default;
background-color: #FFFFFF;
width: 100%;
height: 100%;
}
*
{
margin: 0px 0px 0px 1px;
padding: 0px;
text-align: left;
}
html
{
height: 100%;
margin-bottom: 1px;
}
#container
{
width: 80%;
margin-right: auto;
margin-left: auto;
text-align: left;
background-color: #FFFFFF;
height: 595px;
}
#header {
width:100%;
padding-top:15px;
height: 121px;
}
.spacer {
width:100%;
height:15px;
}
hr {
border-style: none;
border-color: inherit;
border-width: 0px;
color:Black;
background-color:#CDCDCD;
height: 0px;
width: 100%;
text-align: left;
}
h1 {
font-size:28px;
color:white;
background-color: #4F81BD;
font-family:Arial, Verdana, Helvetica, sans-serif;
font-weight:300;
}
h2 {
font-size:15px;
color:Black;
font-family:Arial, Verdana, Helvetica, sans-serif;
font-weight:300;
background-color:#FFFFFF;
}
h3 {
color:Black;
font-size:15px;
text-align:left;
font-weight:300;
padding:5px;
margin-top:5px;
}
#left {
float:left;
width:250px;
background-color:#FFFFFF;
color:black;
height: 417px;
}
#main
{
margin: 1px 5px 5px 260px;
border-left: 1px solid silver;
height: 409px;
padding-right: 3px;
padding-bottom: 3px;
padding-left: 3px;
}
p {
color:black;
background-color:#FFFFFF;
line-height:20px;
padding:5px;
}
a {
color:Blue;
text-decoration:none;
}
a:hover {
color:#cc0000;
text-decoration:underline;
}
#footer {
clear:both;
font-size:12px;
font-family:Verdana, Arial, Helvetica, sans-serif;
}
.right {
color:gray;
background-color:#FFFFFF;
float:right;
font-size:100%;
margin-top:5px;
}
.left {
color:gray;
background-color:#FFFFFF;
float:left;
font-size:100%;
margin-top:5px;
}
I have tried a lot of stuff but nothing seems to work... it will be great if some 1 could have a look and guide me in the right direction..
Thanks
when the browser window is restored down the content on the page gets cramped up..
This means i have to keep the content in the body or main to be fixed.. i dont know how to do that any help..???
In your css class, in the body definition, if you remove
position: fixed;
then the scrollbars appear.

Resources