Click here to Skip to main content
15,894,825 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Drop down list value reeturned on submit button being clicked? Pin
Marc Firth25-Jun-09 1:57
Marc Firth25-Jun-09 1:57 
GeneralRe: Drop down list value reeturned on submit button being clicked? Pin
cdietschrun25-Jun-09 2:25
cdietschrun25-Jun-09 2:25 
QuestionDLL based authentication on Classic ASP Pin
vafo24-Jun-09 6:38
vafo24-Jun-09 6:38 
QuestionForce Download in IE8 ?? Pin
rodolfofmoreira24-Jun-09 4:03
rodolfofmoreira24-Jun-09 4:03 
QuestionRe: Force Download in IE8 ?? Pin
led mike24-Jun-09 4:33
led mike24-Jun-09 4:33 
AnswerRe: Force Download in IE8 ?? Pin
SonnyN22-Jul-09 14:06
SonnyN22-Jul-09 14:06 
Question[PHP + apache] apache_note() vs. apache_setenv() & apache_getenv() to transfer environmental variables from PHP into Apache? Pin
bbranded24-Jun-09 3:23
bbranded24-Jun-09 3:23 
AnswerCSS Hover Menus...without a defined width! [modified] Pin
Arroci23-Jun-09 14:57
Arroci23-Jun-09 14:57 
EDIT: Found the solution to the problem. I used method 1. I nested the navigation bar in a DIV and the content holder in another DIV already, so all I did was set the bottom padding of the navigation's DIV long enough to nest the hover menu as it drops. I then adjusted the contentholder's top margin to a negative value so that the menu could overlap on hover. Hm I might write a tutorial over the summer about how to make a hover menu without a defined width so that the listed items' boxes all align to the width of the item with the maximum width automatically (the menu having no dependancy on it's parent's width). Btw, only tested with FF, IE7/8 and the lastest version of safari. Will test on Opera as well before posting; maybe IE 6 if people still care about it :P.

Another way was to just change the position of the nav bar's div to absolute but that makes things too messy. Much rather be lazy with the margin's solution and not spend ages fiddling about to make it look exactly the same on most browsers.
-------------------------------------------------

Hi guys,

I've been experimenting a way of creating horizontal drop down menus without defining a specific width. I found a solution in the end which works for IE8 and Firefox, but no surprise, IE 7 plays up. Trying to solve for IE7 has left me in two situations:

1) The first method uses:

ul#nav li:hover ul /* show the second tier on hover */
{
    display:block;
    position:absolute;
    padding-top:0px;
    padding-left:0px;
    padding-right:0px;
    padding-bottom:0px;
    margin-left:0px;
}


this is combined with a float:nonein the sorted list held in the unested list (above) i.e ul#nav li:hover ul li. This method works fine in IE 8 and Firefox. I like this method because the hover menu is not limited to the relative width of its parent list. The problem with this method is, on IE 7, for some reason, as I try to hover over the lower list items, the hover menu dissapears and i suspect this has to do with the hover menu overlapping the text and being at a z-index value furthur behind. I tried to bring the z-index value of the hover menu forward but didn't have much luck with that.

second method:

the second method simply uses the old fasioned position:relative to nest the hover menu. I have kept the width undefined, and so long named anchors in the hover menu are not scrunched up! The problem with this method basically is the reverse of the first method. The hovering works fine but now the parent list keeps resizing its length to the maximum width of the child list (if it's wider than the parent list). Furthurmore, the nice floating effect has gone (but i reckon this could easily be fixed).

I have come here to ask if anyone knows a solution to either method. if all else fails i guess i could resort to specific element ids again...

Thanks,

Arroci

modified on Wednesday, June 24, 2009 9:27 AM

Questionhow to save image from webBrowser Control Pin
voo doo1223-Jun-09 12:34
voo doo1223-Jun-09 12:34 
QuestionJavaScript function not defined problem [modified] Pin
cdietschrun23-Jun-09 9:50
cdietschrun23-Jun-09 9:50 
AnswerRe: JavaScript function not defined problem Pin
cmschick24-Jun-09 9:52
cmschick24-Jun-09 9:52 
QuestionPrinting a web page Pin
papy-boom23-Jun-09 8:17
papy-boom23-Jun-09 8:17 
AnswerRe: Printing a web page Pin
Adam Maras23-Jun-09 8:33
Adam Maras23-Jun-09 8:33 
AnswerRe: Printing a web page Pin
Marc Firth25-Jun-09 2:01
Marc Firth25-Jun-09 2:01 
QuestionEditing XML File Published by IIS Pin
Wael_Soltan22-Jun-09 22:59
Wael_Soltan22-Jun-09 22:59 
QuestionHelp on WEB data Pin
Paolo Turrini22-Jun-09 5:54
Paolo Turrini22-Jun-09 5:54 
AnswerRe: Help on WEB data Pin
DoctorMick22-Jun-09 6:21
DoctorMick22-Jun-09 6:21 
QuestionSending Emails Pin
LucBite22-Jun-09 5:11
LucBite22-Jun-09 5:11 
AnswerRe: Sending Emails Pin
Expert Coming22-Jun-09 5:20
Expert Coming22-Jun-09 5:20 
AnswerRe: Sending Emails Pin
Gary Stafford23-Jun-09 13:12
Gary Stafford23-Jun-09 13:12 
QuestionMaintain cursor in parent window when pop-up opens.... Pin
Khawar Abbas121-Jun-09 18:55
Khawar Abbas121-Jun-09 18:55 
AnswerRe: Maintain cursor in parent window when pop-up opens.... Pin
DoctorMick22-Jun-09 6:23
DoctorMick22-Jun-09 6:23 
QuestionExport "Installed Updates" In vista Using VBscript Pin
Geo S Neeliyara21-Jun-09 18:39
Geo S Neeliyara21-Jun-09 18:39 
AnswerRe: Export "Installed Updates" In vista Using VBscript Pin
wSWs30jY6tgX18-Feb-10 18:48
wSWs30jY6tgX18-Feb-10 18:48 
QuestionHow I can Convert one Color to Another Color Pin
Saba0220-Jun-09 2:18
Saba0220-Jun-09 2:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.