ASP Dynamic Menu Sub Menu Disappears on mouse over of submenu. - html

I am having an issue with the submenu disappering for a website that I was asked to update and fix an issue (employee who created is no longer here). Admittedly I am not a UI person but trying to figure this out.
The menu options display and the submenu show when the user mouses over the parent menu item, however as soon as the mouse is moved to the submenu it then disappears. I upped the DisappearAfter tag to 9999. while the menu now displays I am not able to click on the menu item to navigate.
<div id="navigation-container" >
<div id="navigation" >
<asp:Menu ID="menuNavigation" StaticDisplayLevels="1" StaticSubMenuIndent="0" Orientation="Horizontal"
Font-Names="Arial, Gill Sans" runat="server" DynamicEnableDefaultPopOutImage="True"
StaticEnableDefaultPopOutImage="False" DisappearAfter="9999" DynamicHoverStyle-CssClass="navmenuitemhover"
StaticSelectedStyle-BackColor="Red">
<DynamicMenuStyle CssClass="headerzindex10" />
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="navlevel1" />
<asp:MenuItemStyle CssClass="navlevel2" />
<asp:MenuItemStyle CssClass="navlevel3" />
</LevelMenuItemStyles>
</asp:Menu>
</div>
<asp:Label ID="lblOverview" runat="server" Text="Overview" CssClass="overviewLink" />
</div>
CSS Code:
#navigation-container
{
width: 100%;
color: #000;
top:60px;
position:fixed;
left:0px;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4B79BC, endColorstr=#355DAF);
BACKGROUND-COLOR: #4b79bc;
z-index:10;
}
#navigation
{
margin:0px;
position:fixed; /* This fixes the menu items issue*/
padding-left:5px;
z-index:10;
}
.navlevel1
{
color: white;
z-index:10;
top:35px;
padding:5px;
}
.navlevel2
{
color: black;
font-family: Gill Sans MT !important;
font-size: small;
background-color: #a5bcdd;
z-index:10;
top:35px;
}
.navlevel3
{
color: black;
background-color: #dbe4f1;
font-family: Gill Sans MT !important;
font-size: small;
z-index:10;
}
.navmenuitemhover
{
background-color:#253c5e;
color:White;
font-weight:bold;
z-index:10;
}
.headerzindex10
{
position:relative;
z-index:10;
}
Any help would be appreciated.

After many many searches, CSS edits, and re-doing the menu as a JQ Menu, i found that the line filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4B79BC, endColorstr=#355DAF); was causing the issue. Our company uses IE8 as the standard and we are locked down from upgrades.
Researching after the issue was found indicated that using filters in the CSS causes lots of issues in functionality and placement of elements and it is best not to use them.
The 2 options to fix was to use a background image repeated across the <DIV> or to remove and just use a solid color. since the menu bar area so small enough we just used the endColorstr for the menu and it blended nicely with the gradient for the header.

Related

HTML CSS Responsive paragraph tag

I am designing a webpage and I am almost finished but there is a small issue that I can't seem to figure out.
HTML:
<html>
<head>
<style>
* {margin:0; padding:0; text-indent:0; }
.float-box-footer{display:inline-block;position:relative;height:37px;background-color:#accb32;max-width: 860px;width: auto\9;}
.p4{font-size: 12pt; color: black; padding-left:5pt; left:0; top:7pt; font-family:National, Arial, sans-serif;position:relative;}
.p5{font-size: 7pt; color: black; padding-left:465pt;}
</style>
</head>
<body>
<div class='float-box-footer'>
<p class="p4">Learn more <a href="http://www.google.com" alt="" >Google.com</a>
</p>
<p class="p5">© 2016 Google Google of Google. All rights reserved.</p>
</div>
</body>
</html>
When you run the code it shows the green bar with text in it. When you resize the web page width wise the green bar shrinks along with the webpage and stays the proper size. However, the text in the far right does not do that. Once you go so far over it goes out of view and starts wrapping. I need the text to move along with the green bar.
I am stuck on this part and can not seem to figure it out. Can you anyone please help me out on what I am not doing?
Thank you in advance
If you want the green bar to respond to the width of the browser window, I would set your width on .float-box-footer to something like 100%. A percentage value will adjust with the window.
The problem you're facing now is that the width of .float-box-footer is being defined by the children elements inside there. The padding value on .p5 is forcing the green box open. If you give .float-box-footer a fluid width value like 100% and throw a text-align: right; or float: right; onto .p5 you should be in business.
I'd suggest reading up on the fundamentals of the CSS box model: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Box_Model/Introduction_to_the_CSS_box_model
Please do refer the code
* {margin:0; padding:0; text-indent:0; }
.float-box-footer{height:37px;background-color:#accb32;max-width: 860px;width: auto\9;}
.p4{font-size: 12pt; color: black; padding-left:5pt; left:0; top:7pt; font-family:National, Arial, sans-serif;position:relative; width:50%;}
.p5{font-size: 7pt; color: black; width:50%; text-align:right; float: right;}
<div class='float-box-footer'>
<p class="p4">Learn more <a href="http://www.google.com" alt="" >Google.com</a>
</p>
<p class="p5">© 2016 Google Google of Google. All rights reserved.</p>
</div>
<style>
* {margin:0; padding:0; text-indent:0; }
.float-box-footer{
display:inline-block;
position:relative;
height:37px;
background-color:#accb32;
max-width: 860px;
width: auto\9;
white-space: nowrap;
}
.p4{
font-size: 12pt;
color: black;
padding-left:5pt;
left:0; top:7pt;
font-family:National, Arial, sans-serif;
position:relative;}
.p5{
font-size: 7pt;
color: black;
padding-left:465pt;
}
</style>
Add a whitespace property with a no wrap value to the floatboxfooter div.
Check the floatboxfooter properties in my example. Hope this helps.

Why is the same html/css for my .subnav working on one page, but not another?

So I'm extremely new to this html and css thing and I've got a bit of a problem. I'm in the middle of cutting a site for the very first time, but I'm having issues with the positioning of my sub navigation.
My issue is that the Sub Nav on my FAQS Page is being pushed off center and towards the right in the browser. But then, the subnav on the other pages like 'support', which use exactly the same html structure and css style as the one on the FAQS page, are fine and perfectly centered.
When I 'inspect element' in the browser, it seems to be thinking there's an extra subnav button on the left hand side and that the FAQS subnav button is positioned in the middle of the subnav , if that makes sense?
There's a second FAQS Page in the folder which works...but that was made by literally copy and pasting the code from the support page and then cutting out the bits that weren't needed, then copying in the parts from the FAQS page that I needed onto this .html instead.
So I have a feeling it's just a typo or a syntax error or something realllllly simple. I just really want to know what I did so I can avoid it in the future and know how to fix it.
Here is the html for my sub nav ( & page title ):
<div class="grid grid-pad">
<div class="col-1-1">
<div class="subnav clearfix">
Support
FAQS <div class="triangle"> </div>
Swifd Forum
Video Tutorials
</div>
<div class="pagetitle">
<h1 class="pageheading"> FAQS </h1>
<div class="pageheadingborder"> </div>
<h2 class="subtitleFAQS"> Got questions that need answering? <strong> we've got you covered</strong></h2>
</div>
</div>
</div>
And Here is the CSS so far:
/*---------------- SUB NAV ---------------*/
.subnav {
margin: 0 0 60px 0px;
text-align: center;
}
.subnav a {
display:inline-block;
font-family:'Bebas Neue', 'Oswald', Arial, sans-serif;
color:#ffffff;
background-color:#000000;
line-height: 1.5;
font-weight:bold;
text-transform:uppercase;
font-size: 23px;
margin:5px;
width: 180px;
position: relative;
transition: all 200ms ease 0s;
}
a.b1.subactive {
background-color: #ee812c;
}
a.b1.subactive div.triangle {
width: 0;
height:0;
border-style: solid;
border-width: 15px 32.5px 0 32.5px;
border-color: #ee812c transparent transparent transparent;
position: absolute;
top:100%;
left: 50%;
margin-left: -30px;
z-index: 2;
}
.subnav a:active {
top: 2px;
}
I know it's a bit rusty, but any help would be greatly appreciated.
Here is an extremely basic model : https://jsfiddle.net/2Ly4v9qu/
Thankyou!

HTML CSS Show Text box on hovering

What I'm looking for is that when I hover over an image or text it will automatically shows a box that contains a text related to that image. As follows:
CSS :
.owners{
width:500px;
height:300px;
border:0px solid #ff9d2a;
margin:auto;
float:left;
}
span.own1{
background:#F8F8F8;
border: 5px solid #DFDFDF;
color: #717171;
font-size: 13px;
height: 250px;
width:310px;
letter-spacing: 1px;
line-height: 20px;
position:absolute;
text-align: center;
text-transform: uppercase;
top: auto;
left:auto;
display:none;
padding:0 0px;
}
p.own{
margin:0px;
float:left;
position:relative;
cursor:pointer;
}
p.own:hover span{
display:block;
}
HTML :
<div class="owners">
<table width="100%" height="100%" align="center" border="1">
<tr><td width="%" valign="top">
<p class="own"><img src="images/avater.jpg" width="100" height="100" />
<br />
<font style="font-size:15px;">Employee Name</font><span class="own1">some text here should be shown here</span></p>
</td></tr>
<tr><td width="%" valign="top">
<p class="own"><img src="images/avater.jpg" width="100" height="100" />
<br />
<font style="font-size:15px;">Employee Name</font><span class="own1">some text here should be shown here</span></p>
</td></tr>
</table>
</div>
The output for the above codes is a table that contains list of employee images and their names. So when I hover the mouse on top of them, a box shows that contains the text related to it BUT they are shown behind the images and names, by that I mean I am looking to make this box stand in front of the images not behind them. I hope this makes sense! I've tried changing position:absolute and position:fixed but none works as needed!
You can check this also : http://jsfiddle.net/g1o8vyqd/
JSFiddle
Just add the code and you should confirm there is no z-index higher than your hover element.
z-index:9;
to:
p.own:hover span{
display:block;
z-index:9;
}
Use z-index:1 to raise the element above the rest:
p.own:hover span {
display:block;
z-index:1
}
Fiddle: http://jsfiddle.net/g1o8vyqd/3/
Note, also, that your markup is not very good: besides the fact that table is being used incorrectly (it's for tabular data), you are using the font tag, which is obsolete. (In fact, it was deprecated in HTML 4)
Do you mean something like this?
p.own{
margin:0px;
float:left;
position:relative;
cursor:pointer;
opacity: 0;
}
p.own:hover span{
display:block;
opacity: 1;
z-index: 99;
}
Alihamra, It sounds like you are looking for a tooltip. I would recommend cleaning up your code like the previous answers/comments outlined and then trying to utilize something like this: http://www.menucool.com/tooltip/css-tooltip.
Thanks

How to make a hover effect remain?

I have a stack of buttons that, when hovered upon, make a text box appear on the right side of the stack. The purpose of the text box is to be a scroll box, but in order to do that, I need to be able to scroll. Unfortunately, when I take my mouse off the button TO scroll that box, the box goes away because my mouse is no longer on the button to "activate" it.
You can see the live example on my page here. Scroll down to the "Commissions" box on the left and you will see it.
I'm looking to get more of the effect that the one on this page shows in "Art Info".
Here is the CSS code:
*{background:white; border:none; padding:0; margin:0;}
.gr{padding:0 !important;}
.gr-top img, .gr1, .gr2, .gr3 {display:none;}
.gr-top, .bottom, a.external:after, .left br {display:none;}
a{text-decoration:none; font-weight:normal;}
.external{display:block;}
h1{
font-family:Times;
text-align:center;
font-size:18px;
color: #83d4cc;
font-style: italic;
letter-spacing: 3px;
line-height:10px;
}
h2{
font-family:Times;
text-align:center;
font-size:13px;
color: #252424;
font-style: italic;}
.gr-box{
z-index:99!important;
font-family:Times;
text-align:center;
font-size:13px;}
.text{
position:relative;
margin:10px 10% 10px 10%;}
.left{width:180px;}
.textbox{
display:none;
width:276px;
height:276px;
margin-top:32px;
position:absolute;
overflow:scroll;
background: #83d4cc;
left:210px;
color: #ffffff;
top:0;}
.wrap:hover .textbox{display:inline-block;}
.button{
display:block;
color: #FFFFFF;
background: #252424;
border-radius:0px;
padding:9px 0px;
margin-bottom:4px;}
.button:hover{
color: #FFFFFF;
background: #83d4cc;
}
.button span{
display:none;
font-size:0.85em;}
.button:hover span{display:inline;}
Here is the HTML code:
<div class="left"><h1>Commissions</h1><h2>Hover for more information</h2><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/48200599">Manipulations</a><div class="textbox"><div class="lmf"></div>Manipulations textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/47299585">Howrse Layouts</a><div class="textbox"><div class="lmf"></div>Howrse Layouts textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/49118216">Gallery Directories</a><div class="textbox"><div class="lmf"></div>Gallery Directories textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/48666470">Journal Skins</a><div class="textbox"><div class="lmf"></div>Journal Skin textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/47299612">Banners</a><div class="textbox"><div class="lmf"></div>Banners textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/48200600">Stamps & Icons</a><div class="textbox"><div class="lmf"></div>Stamps & Icons textbox</div></div><div class="wrap"><a class="button" href="http://gracefuleigh.deviantart.com/gallery/49118169">Folder Menus</a><div class="textbox"><div class="lmf"></div>Folder Menus textbox</div></div> <div class="wrap"><a class="button" href="">Other</a><div class="textbox"><div class="lmf"> </div> Other textbox </div></div> <h2>Page design by :devgracefuleigh:</h2> </div> <div class="clear"></div>
Thank you so much for the help, in advance!
- Leigh
You can use jquery fadeIn to make the textBox appear (see http://api.jquery.com/fadein/) with the onmouseover event, then have an icon or link to close the text box when the user is finished.
I hope this this fiddle can help you out http://jsfiddle.net/S7EjW/
The element which is appearing on hover needs to be inside the element which is hovered, else when the mouse moves out it triggers the mouseleave event which fades the element off.
HTML
<div class="element">
<span class="title">Hover Me to see info.</span>
<span class="info">This is a sample info span that appears on hovering the title.</span>
</div>
JS
$(".element").hover(function(){
$(this).find(".info").fadeIn(500);
}, function(){
$(this).find(".info").fadeOut(500);
});
Fiddle Link : http://jsfiddle.net/z3EML/
To make hover effect remain, you need to use Javascript or jQuery.
On hovering of element, you'll add the class to the element which you need to show.
Like this :
HTML :
<div class="menu">
Hover
</div>
<div class="textbox">
<input type="text"/>
</div>
CSS :
.menu{
float:left;
}
.show_textbox{
background:#dadada;
padding:5px;
color:#000;
text-decoration:none;
}
.textbox{
float:left;
display:none;
margin-left:5px;
}
.show{
display:block!important;
}
JS :
$(document).ready(function(){
$('.show_textbox').hover(function(){
$('.textbox').addClass('show');
});
});
This jQuery will add the .show class to the element when it is hovered. You can add CSS properties to .show which you need to add in hover state.
It'll keep the hover state until the page is refreshed.
I couldn't comment, so im answering you question with what i know off the top of my head.
look into CSS3, there is an operator ">" that you should become familiar with

Search Text Box jumping while navigating to other pages

I do not really know, when this problem occurred.
When you open http://bmsc.tfei.info/en/ -Search-box location is fine,
when you navigate to any page http://bmsc.tfei.info/en/about-us it jumps to upper.
What can cause such a problem?
In all browsers the same problem.
What I did is separated 2 stylesheet one for english version and one for russian version;
And added jQuery library.
Please help, thanks in advance!
Here is my css for div search
#search
{
width:28%;
margin:0;
float:right;
height:40px;
padding-left:0px;
padding-right:0px;
}
and textbox with button
#mod-search-searchword {
border-radius: 3px;
margin-top: 3px;
padding-left: 2px;
padding-right: 0px;
width:72%;
min-width:150px;
height:10px;
}
.search .button{
margin-top:3px;
margin-left:5px;
margin-right:3px;
}
and html code
<div id='search' >
<jdoc:include type="modules" name="search" style="well" />
</div>
Your problem is here...
#top {
overflow: visible !important;
}
This rule is not being used on the other pages.