CSS - Problem With Css Popup Div.
http://siliconsatan.com/test.php
The above test example is for a DIV that will show / hide with a click on a button / link. Problem: Scroll down a bit, click on one of the links. The whole page will scroll to the top. It has something to do with the <a> tag. I could get rid of the <a> tag, but then I would have to use JS to both do the roll-over, and trap the "click" event? I'm actually using JS to trap the "click" event anyway, but I was hoping for a fully CSS roll-over function. (The content - <li> ... </li> - is dynamically populated, or in the final it will be) What am I doing wrong? Similar TutorialsThe spry tabs works fine if the page is directly accessed, however, when the page is accessed through the pop-up window (image below) the spry tabs are not click-able and all the contents are displayed all at once. URL I am using a local server so I do not have a url link. CSS Code Code: @charset "UTF-8"; /* SpryTabbedPanels.css - Revision: Spry Preview Release 1.4 */ /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */ /* Horizontal Tabbed Panels * * The default style for a TabbedPanels widget places all tab buttons * (left aligned) above the content panel. */ /* This is the selector for the main TabbedPanels container. For our * default style, this container does not contribute anything visually, * but it is floated left to make sure that any floating or clearing done * with any of its child elements are contained completely within the * TabbedPanels container, to minimize any impact or undesireable * interaction with other floated elements on the page that may be used * for layout. * * If you want to constrain the width of the TabbedPanels widget, set a * width on the TabbedPanels container. By default, the TabbedPanels widget * expands horizontally to fill up available space. * * The name of the class ("TabbedPanels") used in this selector is not * necessary to make the widget function. You can use any class name you * want to style the TabbedPanels container. */ .TabbedPanels { margin: 0px; padding: 0px; float: left; clear: none; width: 100%; /* IE Hack to force proper layout when preceded by a paragraph. (hasLayout Bug)*/ } /* This is the selector for the TabGroup. The TabGroup container houses * all of the tab buttons for each tabbed panel in the widget. This container * does not contribute anything visually to the look of the widget for our * default style. * * The name of the class ("TabbedPanelsTabGroup") used in this selector is not * necessary to make the widget function. You can use any class name you * want to style the TabGroup container. */ .TabbedPanelsTabGroup { margin: 0px; padding: 0px; } /* This is the selector for the TabbedPanelsTab. This container houses * the title for the panel. This is also the tab "button" that the user clicks * on to activate the corresponding content panel so that it appears on top * of the other tabbed panels contained in the widget. * * For our default style, each tab is positioned relatively 1 pixel down from * where it wold normally render. This allows each tab to overlap the content * panel that renders below it. Each tab is rendered with a 1 pixel bottom * border that has a color that matches the top border of the current content * panel. This gives the appearance that the tab is being drawn behind the * content panel. * * The name of the class ("TabbedPanelsTab") used in this selector is not * necessary to make the widget function. You can use any class name you want * to style this tab container. */ .TabbedPanelsTab { position: relative; top: 1px; float: left; padding: 4px 10px; margin: 0px 1px 0px 0px; font: bold 0.7em sans-serif; background-color: #DDD; list-style: none; border-left: solid 1px #CCC; border-bottom: solid 1px #999; border-top: solid 1px #999; border-right: solid 1px #999; -moz-user-select: none; -khtml-user-select: none; cursor: pointer; } /* This selector is an example of how to change the appearnce of a tab button * container as the mouse enters it. The class "TabbedPanelsTabHover" is * programatically added and removed from the tab element as the mouse enters * and exits the container. */ .TabbedPanelsTabHover { background-color: #CCC; } /* This selector is an example of how to change the appearance of a tab button * container after the user has clicked on it to activate a content panel. * The class "TabbedPanelsTabSelected" is programatically added and removed * from the tab element as the user clicks on the tab button containers in * the widget. * * As mentioned above, for our default style, tab buttons are positioned * 1 pixel down from where it would normally render. When the tab button is * selected, we change its bottom border to match the background color of the * content panel so that it looks like the tab is part of the content panel. */ .TabbedPanelsTabSelected { background-color: #EEE; border-bottom: 1px solid #EEE; } /* This selector is an example of how to make a link inside of a tab button * look like normal text. Users may want to use links inside of a tab button * so that when it gets focus, the text *inside* the tab button gets a focus * ring around it, instead of the focus ring around the entire tab. */ .TabbedPanelsTab a { color: black; text-decoration: none; } /* This is the selector for the ContentGroup. The ContentGroup container houses * all of the content panels for each tabbed panel in the widget. For our * default style, this container provides the background color and borders that * surround the content. * * The name of the class ("TabbedPanelsContentGroup") used in this selector is * not necessary to make the widget function. You can use any class name you * want to style the ContentGroup container. */ .TabbedPanelsContentGroup { clear: both; border-left: solid 1px #CCC; border-bottom: solid 1px #CCC; border-top: solid 1px #999; border-right: solid 1px #999; background-color: #EEE; } /* This is the selector for the Content panel. The Content panel holds the * content for a single tabbed panel. For our default style, this container * provides some padding, so that the content is not pushed up against the * widget borders. * * The name of the class ("TabbedPanelsContent") used in this selector is * not necessary to make the widget function. You can use any class name you * want to style the Content container. */ .TabbedPanelsContent { padding: 4px; } /* This selector is an example of how to change the appearnce of the currently * active container panel. The class "TabbedPanelsContentVisible" is * programatically added and removed from the content element as the panel * is activated/deactivated. */ .TabbedPanelsContentVisible { } /* Vertical Tabbed Panels * * The following rules override some of the default rules above so that the * TabbedPanels widget renders with its tab buttons along the left side of * the currently active content panel. * * With the rules defined below, the only change that will have to be made * to switch a horizontal tabbed panels widget to a vertical tabbed panels * widget, is to use the "VTabbedPanels" class on the top-level widget * container element, instead of "TabbedPanels". */ /* This selector floats the TabGroup so that the tab buttons it contains * render to the left of the active content panel. A border is drawn around * the group container to make it look like a list container. */ .VTabbedPanels .TabbedPanelsTabGroup { float: left; width: 10em; height: 20em; background-color: #EEE; position: relative; border-top: solid 1px #999; border-right: solid 1px #999; border-left: solid 1px #CCC; border-bottom: solid 1px #CCC; } /* This selector disables the float property that is placed on each tab button * by the default TabbedPanelsTab selector rule above. It also draws a bottom * border for the tab. The tab button will get its left and right border from * the TabGroup, and its top border from the TabGroup or tab button above it. */ .VTabbedPanels .TabbedPanelsTab { float: none; margin: 0px; border-top: none; border-left: none; border-right: none; } /* This selector disables the float property that is placed on each tab button * by the default TabbedPanelsTab selector rule above. It also draws a bottom * border for the tab. The tab button will get its left and right border from * the TabGroup, and its top border from the TabGroup or tab button above it. */ .VTabbedPanels .TabbedPanelsTabSelected { background-color: #EEE; border-bottom: solid 1px #999; } /* This selector floats the content panels for the widget so that they * render to the right of the tabbed buttons. */ .VTabbedPanels .TabbedPanelsContentGroup { clear: none; float: left; padding: 0px; width: 30em; height: 20em; } See here the live version: jsfiddle.net/nrWug i want that the menu in the popup is binded ondrag or onresize to the outer popup. How can i bind these two to make the dialog draggable and resizable? thanks for your time. I'm using Eric Meyer's Pure CSS Popups template for a new site. I want to have a graphic pop up in the middle of the page for one particular link when clicked, rather than have the browser load a new page, but I don't know how to go about it. Can anybody shed some light on how to alter the stylesheet to have this one link act differently from the rest? Thanks. Hi everyone, I am wondering why IE sucks so bad... Just kidding. Actually, my CSS popup appears in Mozilla Firefox (best browser on earth ) but not in IE. The guy that I learned it from (http://www.meyerweb.com/eric/css/edge/popups/demo.html) works in both IE and Mozilla, and I dont understand why mine doesn't any help would be appreciated Mine: Code: div#links a span {display: none;} div#links a:hover span {display: block; position: absolute; top: 160px; left: -10px; width: 125px; padding: 0px; margin: 0px; z-index: 100; color: #000; background: #fff; font: 10px Verdana, sans-serif; text-align: left; } div#links {position: absolute; top: 96px; left: 27px; width: 58px; height: 20px; font: 10px Verdana, sans-serif; z-index: 100;} div#links a {display: block; font: 10px Verdana, sans-serif; padding: 0px; margin: 0 0 1px; border-width: 0; text-decoration: none; color: #fff; } His: Code: div#links {position: absolute; top: 81px; left: 0; width: 166px; height: 700px; font: 16px Verdana, sans-serif; z-index: 100;} div#links a {display: block; text-align: center; font: bold 1em sans-serif; padding: 5px 10px; margin: 0 0 1px; border-width: 0; text-decoration: none; color: #FFC; background: #444; border-right: 5px solid #505050;} div#links a:hover {color: #411; background: #AAA; border-right: 5px double white;} div#links a span {display: none;} div#links a:hover span {display: block; position: absolute; top: 180px; left: 0; width: 125px; padding: 5px; margin: 10px; z-index: 100; color: #AAA; background: black; font: 10px Verdana, sans-serif; text-align: center;} I have the following page: http://take2records.com/test/dbtest.php Which you can test using http://take2records.com/test/dbtest...4&id_num=404100 What I need is to be able to have a popup any time you hover over a particular row in the generated table. I found this code to do the hover: Code: class="thumbnail" href="#thumb"><img src="media/tree_thumb.jpg" width="100px" height="66px" border="0" /><span><img src="media/tree.jpg" /><br />Simply beautiful.</span></a> <br /> <br /> <a class="thumbnail" href="#thumb">Dynamic Drive<span><img src="media/dynamicdrive.gif" /><br />Dynamic Drive</span></a><br /> But I don't see how to apply this when the user hovers over a particular row. Hi to all How to show popup on hover the link through css like <a here="">Hover here</a> show a popup on left side of the link thanks in advance I'll admit right off - I don't know much about CSS. I have a page that displays the event logs on my servers. If I display the whole message of each event it will take up way too much space. I'd like to have it so that if you move your mouse over the message like of the event, a "window" pops up (without navigating away from the page they are on) with the whole message. I know my viewers are going to be using IE 6.1. I've looked through here and on google for it, and I think I'm just looking in the wrong place. Thanks. Hi I'm building a selectbox insead of using the common select tag. I use the windows.createpopup() method to display the list of choise. Differently to the div object the popup object is like a new window so it doesn't inherit the css style sheet I've attached to the main window. I tought to attach it by using the addImport(url) method of the styleSheet object but it doesn't seem to work. Here it's my code, the show function it's called when the selectbox expands: var Select_box = window.createPopup(); Select_box.document.styleSheets[0].addImport("URL('common/css/default_style.css');") function show(element) { if (Select_box.isOpen==false) { Select_box.document.body.innerHTML = Select_box_content.innerHTML; Select_box.document.body.className='selectbox'; Select_box.show(0, 18, 150, 50, element); } else { Select_box.hide(); } } I've noticed that using the addImport method on the main window, and not on the instance of the select_box, with 0 index of the styleSheet the error doesn't occur but it doesn't also change the proprety. Tring using any other index value it gives me the usual error. So how can I attach a style sheet to a popup created with the window.createpopup()? Thank you Hi guys, i really don't know if this can be accomplished with CSS but here it goes: I want a user that's filling a form on my web application to be able to click on a certain field(or a link near that field) and pop out another form, fill it, submit it and then continue to fill the original form. Maybe there's a bit of Javascript there or a combination of technologies, i really don't know so forgive me if i'm in the wrong forum, but i've seen similar stuff done with CSS, so if any of you has any idea on how i can accomplish this i'd appreciate it very much. I've attached a graphic to illustrate it better. Thanks! Hi, I'm still relatively new to CSS and liquid layouts, so please bear with me. I've made a new layout using only CSS over he http://www.abhiram.astahost.com/trialcss/index.html and the CSS file is: http://www.abhiram.astahost.com/trialcss/mystyle.css Now, when I move the mouse over one of the menu buttons, there should be a popup text that appears below the the button. The problem is, I don't want the button size to increase when you move the mouse over it. This is happening because I've had to use 'position:relative'. Also, I don't want the 'content' and 'rightbar' regions moving down when you mouse over it. I've designed this in 1024x768 res. Any ideas? One way of doing it would be to use absolute positioning, but I want the text to appear below each button. Thanks a lot. Good day to you all, I'm working on a css popup script. It work, but I would like the popup to be always in the center of the window. here is my code : PHP Code: echo "<a onmouseover=this.style.cursor=\"pointer\" ' onfocus='this.blur();' onclick=\"document.getElementById('".$value."').style.display = 'block' \" ><img src=\"".$directory."/".$value."\" width=\"50px\"></a>\n"; echo "<div id='".$value."' style='display: none; position: absolute; text-align:left; margin: -50px -200px; margin-top:-150px; z-index:50; border: solid black 1px; padding: 10px; background-color: rgb(255,255,225); text-align: justify; font-size: 12px; '>"; echo "<img src=\"".$directory."/".$value."\" /><br />".$value."<br/>"; echo "<div style='text-align: right;'><a onmouseover='this.style.cursor=\"pointer\" ' style='font-size: 12px;' onfocus='this.blur();' onclick=\"document.getElementById('".$value."').style.display = 'none' \" ><span style=\"color:#000000;\">Close</span></a></div></div>"; Thanks! Hi, I have made a simple table in html, with mouseover on the rows to change the background colour. I also have onclick to take the user to the next page. What I really need to do is there a way of making a popup text, like the ones on this site's topic view. I have looked at the source code, and tried copying one <tr> row into a test html file, but no popup. Basically, my question is this: How can I make the table have a popup, for each <tr>, that shows non-dynamic text. Thanks in advance, Prism128 I have seen it once but cannot find it. What I am looking for is a script or stylesheet code that when the mouse is over an image that is a link, a large size of that image will appear as a popup and disappear when mouse is removed, how do I do it or when can I find it. Thanks Tim Thank you for stopping by! I'd like some guidance about a problem that has to do with CSS (and a bit of JavaScript I guess) and trying to position an overlaying DIV. The problem description is quite simple; When I click an image on the "main" area, a div gets, with a little help from javascripting, its display property set to "block". This surely and safely makes the div's content appear as it should and all is fine. I now have a headache from trying to figure out how I could position this div. I know what I'd like to do but I can't quite figure out how to get it right. I'd like to have the popup-div center itself on the page, regardless of the size of contents inside it. The content mostly consists of text of varied amounts and next to no images or other media content. If you got any ideas about this or got a link to a website that's similar to what I'm trying to accomplish or any input at all, feel free to make a comment! It's much appreciated! Here's what the popup CSS looks like atm: Code: div.PopUp { width: 550px; border: dashed silver 1px; display: none; position: absolute; left: 150px; top: 50px; background-color: black; text-align: justify; font-size: 10pt; color: black; } Regards DrLaban Hi all, Thanks for the interest, I want to set my menus like the categories in alibaba.com ( the menu of the left side), on mouse over the sub menus should come up in the same way as here. How can I achieve this ? Thank you guys Hi, At work I have to do popup menus (I hate them), so I am trying with all I have to not use Javascript. I have the following working using just CSS and HTML: Code: <!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-US" lang="en-US"> <head> <title>Pure CSS Popups</title> <style type="text/css"> body { font-family: Arial; } div#menubar { background-color: steelblue; font-weight: bold; } div#menubar a.menuhead { position: relative; text-decoration: none; margin-right: 18pt; color: darkblue; } div#menubar a.menuhead:hover { color: white; background-color: darkblue; } div#menubar a.menuhead div.menu { visibility: hidden; position: absolute; left: 0; top: 1em; width: 15em; background-color: steelblue; border: 2px solid darkblue; } div#menubar a.menuhead:hover div.menu { visibility: visible; } div#menubar a.menuhead div.menu div.menuitem { width: 100%; cursor: pointer; background-color: steelblue; border-bottom: 1px solid darkblue; } div#menubar a.menuhead div.menu div.menuitem:hover { background-color: darkblue; } div.menuitem a { } </style> </head> <body> <div id="menubar"> <a class="menuhead" href="">Menu 1 <div class="menu"> <div class="menuitem">Menuitem 1</div> <div class="menuitem">Menuitem 2</div> <div class="menuitem">Menuitem 3</div> <div class="menuitem">Menuitem 4</div> <div class="menuitem">Menuitem 5</div> </div> </a> </div> </body> </html> Now what I want to do is put real hyperlinks inside of the menuitem divs. However, when I do so it messes up for some strange reason in both Firefox and IE. If someone could tell me why I would GREATLY appreciate it. Code: <div id="menubar"> <a class="menuhead" href="">Menu 1 <div class="menu"> <div class="menuitem">Menuitem 1</div> <div class="menuitem">Menuitem 2</div> <div class="menuitem"><a href="">Menuitem 3</a></div> <div class="menuitem">Menuitem 4</div> <div class="menuitem">Menuitem 5</div> </div> </a> </div> In Firefox, the menu items after the one with the hyperlink no longer format correctly, and the menu also becomes part of the menubar. In IE it looks ok, but when the mouse is moved over the menuitem hyperlink the menu goes away. In both, the menuitem divs get shrunk down to the width of the text. Any ideas??? Is it possible to have a CSS popup (a:hover) be positioned with regard to the mouse pointer position similar to a tooltip? I want to make a css "div-popup", and when it pops up the whole page behind the popup should be covered in 50% transparent black. I suppose this has been done before, but I failed to google it, I don't know what to search for Any ideas? |