I am trying to create a menu in the MasterPage that is displayed when a hyperlink is clicked. YardimDokumaniMenuAHREF is the hyperlink that displays the menu. As you can see, a javascript is called when I click on it. However contensts of the cells can not be displayed due to contentplaceholder. Please see the screenshot.
and this is my code. can someone help me out with this?
<a id="YardimDokumaniMenuAHREF" href="javascript:DisplayMenu('ctl00_YardimDokumaniMenuContent')" runat="server" title="">YARDIM DÖKÜMANI</a>
<%-- YardimDokumaniMenuAHREF triggers YardimDokumaniMenuContent to be displayed --%>
<div ID="YardimDokumaniMenuContent" runat="server" style="visibility:hidden; position:absolute; z-index:-99999">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
hadi bakalııııım
</td>
</tr>
<tr>
<td>
hadi bakalııııım333
</td>
</tr>
</table>
</div>
</li>
<li class=""><a href="~/Default.aspx" title="Ana Sayfa" runat="server" id="AnaSayfaLink">
Ana Sayfa</a> </li>
<li class=""><a href="~/Everyone/iletisim.aspx" runat="server" title="Bilgi almak istiyorum, şikayetim var, haklı müşteriyim.">
İLETİŞİM / YARDIM MASASI</a></li>
<li class="current_page_item" runat="server" id="OnlineIslemLink"><a id="A1" runat="server"
href="https://ode.a-kent.com/Yetki/Login.aspx">ONLINE İŞLEM</a> </li>
<li class="">
<asp:LinkButton ID="LogoutLinkButton" runat="server" CausesValidation="false" OnClick="LogoutLinkButton_Click">GÜVENLİ ÇIKIŞ</asp:LinkButton>
</li>
</ul>
</div>
<!-- globalNav end -->
</div>
<!-- header end -->
<div id="main">
<div class="panel fetaured" style="left: 192px; top: 0px; width: 755px;">
<div class="comments">
<b>GERİ</b>
</div>
</div>
</div>
<div>
<asp:ContentPlaceHolder runat="server" ID="LeftPanelContentPlaceHolder">
</asp:ContentPlaceHolder>
Display menu function:
<script type="text/javascript">
function DisplayMenu(obj) {
obj = document.getElementById(obj);
obj.style.visibility = 'visible';
}
</script>
Remove the z-index:-99999from the YardimDokumaniMenuContent div style. If that doesn't work, ensure the z-index of that div is greater than the one of the background.
Related
I am trying to align my buttons in the center. And the text that is currently pulled right I want next to my buttons, and centered. Ive been trying placing rows in every possible combination and Ive tried centering stuff in all sort of ways but just cant get it right.
At the moment I'm forced to use a <br> to get all of it to stay on the same row. But there must be a way to fix this that I'm missing. If I try to remove pull-right it just changes row instead of placing itself next to the button.
Code:
<ItemTemplate>
<td>
<div class="list-group-item">
<%# Eval("URL") %>
<asp:LinkButton ID="UpVoteButton" runat="server" CssClass="btn btn-default btn-xs" style="margin-left:2%"><i class="fa fa-chevron-up" style="color:green"></i></asp:LinkButton>
<div class="pull-right">
<asp:Label ID="LabelScore" runat="server" Text="Score: "></asp:Label>
<asp:Label ID="LabelScoreValue" runat="server" Text="234"></asp:Label>
</div>
<br />
<asp:LinkButton ID="DownVoteButton" runat="server" CssClass="btn btn-default btn-xs" style="margin-left:2%"><i class="fa fa-chevron-down" style="color:red"></i></asp:LinkButton>
</div>
</td>
</ItemTemplate>
Current look:
I have fixed your issue this way, try this one and see if it works.
<style>
a.lnk-content, .lbl-score {
display:block;
margin-left: 30px; /* adjust this based on your requirement*/
margin-top: 10px; /* adjust this based on your requirement*/
}
</style>
<td style="border: 1px solid black; height: 50px;">
<div class="row">
<div class="col-xs-7"> <!-- adjust the columns based on your needs -->
this is my link
</div>
<div class="col-xs-5"> <!-- adjust the columns based on your needs -->
<div class="pull-left">
<div><asp:LinkButton ID="UpVoteButton" runat="server" CssClass="btn btn-default btn-xs"><i class="fa fa-chevron-up" style="color:green"></i></asp:LinkButton></div>
<div><asp:LinkButton ID="DownVoteButton" runat="server" CssClass="btn btn-default btn-xs"><i class="fa fa-chevron-down" style="color:red"></i></asp:LinkButton></div>
</div>
<div class="lbl-score">
<asp:Label ID="LabelScore" runat="server" Text="Score: "></asp:Label>
<asp:Label ID="LabelScoreValue" runat="server" Text="234"></asp:Label>
</div>
</div>
</div>
</td>
and this is the result, you could adjust this in anyway you want easily now:
the buttons on the result below don't appear properly because I don't have the styles.
I hope it helps you.
I have a navigationbar that's controled completly by css ul and li.
The first unordered list contains listitems which are always displayed (General Site pages).
on hovering over the listitem (Gamma), the sublistitems appear. These sublistitems are themself in an unordered list of car models with the modelname. Hovering one of these items show me a picture of the car in a seperate div.
When I create the list of cars manually all works fine. The car models en their image are shown correctly.
When I create the unordered list dynamically by a listview. The car names are not shown.
If I place the listview out of the navigation ul. The listview works correct.
I assume it has something to do with the moment that the listview creates the unordered list. Can anyone point me in the right direction?
My ASP.net code
<nav>
<ul class="menu">
<li><a class="active" href="Default.aspx">H</a></li>
<li>Gamma
**<asp:ListView ID="lvGamma" runat="server">
<LayoutTemplate>
<ul>
<asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
</ul>
</LayoutTemplate>
<ItemTemplate>
<li><a href='<%# "AixamGamma.aspx?Model=" + Eval("car.NewCarID").ToString %>' class="sublistitem" >
<asp:Label ID="lblModelName" runat="server" Text='<%# Eval("car.ModelName") %>'></asp:Label></a>
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h3>
<asp:Label ID="lblModelSlogan" runat="server" Text='<%# Eval("car.Slogan") %>'></asp:Label>
</h3>
</div>
<div class="grid_3">
<div class="wrapper">
<img src='<%# Eval("image.ImageLocationPath") + Eval("image.ImageFileName")%>' alt='<%# Eval("car.ModelName") %>'
class="img-max-h200-w200" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
</ItemTemplate>
</asp:ListView>**
*<ul>
<li>City</li>
<li>CityS</li>
<li>Crossline</li>
<li>GTO
<div class="modeldetail">
<div class="redbox">
<div class="whitebox">
<div class="container_12">
<div class="wrapper">
<div class="grid_5">
<h2>
De nieuwe Aixam Gto</h2>
<p>
Rijden zonder rijbewijs in een sportief kleedje</p>
</div>
<!--- image width max 220px --->
<div class="grid_3">
<div class="wrapper">
<img src="images/Sliders/Aixam%20GTO.jpg" alt="Gto" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</li>
<li>Crossover</li>
</ul>*
</li>
<li>Tweedehands</li>
<li>Onderhoud/herstelling </li>
<li>Wetgeving</li>
<li>Contact</li>
</ul>
</nav>
the bold part doesn't work except when its placed out the navigation list, the italic part does
thx for the help
I got it working. I've tested the code with the hard coded unordered list AND the listview together in one item. Removing the hard coded list did the trick....
My Code:
<p:splitButton value="View">
<p:menuitem value="Edit" icon="ui-icon-edit" />
<p:menuitem value="Delete" icon="ui-icon-delete"/>
</p:splitButton>
that code is rendering the menu appended to the body, for example:
<body>
<form>
<table>
<tr>
<button id="splitbutton".../>
</tr>
</table>
</form>
<div id="menu-for-splitbutton">
<a id="menu1"... >Edit</a>
<a id="menu2"... >Delete</a>
</div>
</body>
I need the menu relative to the splitbutton or adjacent, for example:
<body>
<form>
<table>
<tr>
<button id="splitbutton".../>
<div id="menu-for-splitbutton">
<a id="menu1"... >Edit</a>
<a id="menu2"... >Delete</a>
</div>
</tr>
</table>
</form>
</body>
I'm using :hover (CSS) to show the split button when the cursor is over a row, but is not hiding the context menu when any row is unselected because the menu is not inside the TR tag... How I can resolve this?
I have a couple divs and they are set up to be sepereate. but when I load the page they all go underneath the first div that is created. So the example below SiteFullControl is the first div, everything just falls underneath here when the page load. any ideas?
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
</div>
<div id="SitePartialControl" >
<partialalbum:partialalbum ID="partialcontrolalbums" runat="server" />
</div>
<div id="SiteViewOnlyAlbums" class="">
<viewonly:viewonly ID="viewonlyalbums" runat="server" />
</div>
<div id="SitePublicAlbums" class="">
<publicalbum:publicalbum ID="publicalbum" runat="server" />
</div>
<div id="SiteFavoriteAlbums" class="">
<favoritealbum:favoritealbum ID="favoritealbum" runat="server" />
</div>
<div id="SiteFriends" class="">
<friends:friends ID="friend" runat="server" />
</div>
<div id="SiteCreateAlbum" class="">
<createalbum:createalbum ID="createalbums" runat="server" />
</div>
Example of whats happen when the page load
<div id="SiteFullControl" >
<fullcontrol:FullAlbum runat="server" ID="FullControlAlbum" />
I checked the css with firebug and it does not have any position for the css.
use this CSS rule, it may work:
display:block;
no more help can be given without accessing CSS properties.
In Asp.net website i work with(on which i had no prior knowledge) there is repeater and html markup. The output i get is spaghetti code mixture of databinded code and also markup after the repeater. The Code Behind and Markup is given below
<ul>
<li>
<a name="products"> Products</a>
<asp:Repeater ID="RT_Category" runat="server">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Category")%>
<asp:Repeater ID="RT_SubCategory" runat="server" DataSource='<%# DataBinder.Eval(Container.DataItem, "SubCat") %>'>
<HeaderTemplate><ul class="test1"></HeaderTemplate>
<ItemTemplate>
<li><a href='<%# DataBinder.Eval(Container.DataItem, "LinkS") %>'><%# DataBinder.Eval(Container.DataItem, "SubcatName")%></a></li>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:Repeater>
</ItemTemplate>
</asp:Repeater>
</li>
</ul>
<ul id="mega">
<li>SCHOOLS
<div>
<h2>Classes</h2>
<p>TimesSchedualMap</p>
<p>NamesStudyDirections</p>
<p>HealthDanceBiology</p>
<h2>Teachers</h2>
<p>BillyMadeleineLauren</p>
<p>PaddingtonStefanMichael</p>
<p>ShannonMaryRaffaello</p>
<h2>Location</h2>
<p>CarlsbadOceansideEl Cajon</p>
<p>VistaLa CostaEncinitas</p>
<p>San DiegoLos AnglesCardiff</p>
<h2>Months</h2>
<p>JanaryFebruaryMarchApril</p>
<p>MayJuneJulyAugust</p>
<p>SeptemberOctoberNovemberDecember</p>
</div>
</li>
Heres whats being output to my browser...
<ul>
<li class="">
<a name="products" id="products">Products</a> Designer Corner Groupings
<div class="test1" style="margin-left: 2em; visibility: hidden">
Chairs
<ul class="test1">
<li><a href="/classicfurniture4u/s/Modern-chairs/PpAqk7vjo8c/s">Modern
chairs</a></li>
<li style="list-style: none">Tables
<ul class="test1">
<li><a href="/classicfurniture4u/s/Coffee-tables/j0DuY5817sM/s">Coffee
tables</a></li>
</ul>
<ul id="mega">
<li class="">
SCHOOLS
<div style="z-index: 985;">
<h2>Classes</h2>
<p>TimesSchedualMap</p>
<p>NamesStudy<a href=
"#">Directions</a></p>
<p>HealthDance<a href=
"#">Biology</a></p>
<h2>Teachers</h2>
<p>BillyMadeleine<a href=
"#">Lauren</a></p>
<p>PaddingtonStefan<a href=
"#">Michael</a></p>
<p>ShannonMary<a href=
"#">Raffaello</a></p>
<h2>Location</h2>
<p>CarlsbadOceanside<a href="#">El
Cajon</a></p>
<p>VistaLa Costa<a href=
"#">Encinitas</a></p>
<p>San DiegoLos Angles<a href=
"#">Cardiff</a></p>
<h2>Months</h2>
<p>JanaryFebruary<a href=
"#">March</a>April</p>
<p>MayJuneJuly<a href=
"#">August</a></p>
<p>SeptemberOctober<a href=
"#">November</a>December</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
</li>
</ul>
When you're using a Repeater to build up lists, it's generally easier to put the <ul> opening and closing tags in the repeater's header and footer, respectively. So something like this:
<asp:Repeater ... runat="server">
<HeaderTemplate>
<ul>
</HeaderTemplate>
<ItemTemplate>
<li><!-- data binding stuff --></li>
</ItemTemplate>
<FooterTemplate>
</ul>
</FooterTemplate>
</asp:Repeater>
Nevermind, there was a missing close tag in FooterTemplate /FooterTemplate