CSS - Control - Mouse Scroll And Divs
i made a nice pop up div with object details.
when i control scroll and resize the browser contents everything follows except this pop up div. so the content inside explodes or shrinks where the actual div height and width stay the same. what have you guys done to fix this? thanks Similar TutorialsI have a sad feeling that its not possible, but I thought I'd ask anyway... I have a box element that is 150px x 400px with overflow: scroll; The box contains a large list of links. Now, the user can scroll down and click on a link in the box, which causes the page to refresh. Is there a way of making the scroll bar in the box "drop down" to the element that was clicked when the page is refreshed? It would be very similar to how named anchors work to force a whole page to scroll to a certain position.... Ok, so I've learned to stay away from tables when you don't need them, and I have an instance where this is the case. I have a container div that has a header, content and a footer. On my home page, I have to divs next to each other with the same height and a div below them towards the right. To simplify my problem, look at this example. Code: <html> <body> <div style="float:right"> Hello there! </div> <hr> </body> </html> If there's a "float:right" on that div, the hr tag below doesn't get pushed down. But if I use relative positioning and don't use the floats, I can't put the two top divs next to each other. The other option is to use absolute positioning, but again content below doesn't get pushed down correctly. It seems that using "clear:both" works, but it seems weird that this has to be done. For example if I have floating divs in a container, I can get them to stretch out the container like so: Code: <html> <body> <div style="border: 1px solid #000; "> <div style="float:right"> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> Hello there!<br /> </div> <div style="clear: both"></div> </div> <hr> </body> </html> Am I missing something fundamental here? Is there a better solution? Thanks in advance. I've defined three classes in this page but now I can't scroll down to the end of the page. the vertical scroll bars are missing. why is that? hello. i am having some trouble, my page has a scroll bar at the bottom but there is nothing there to scroll. It is only a centimeter or so but still aint good!! It is just background...yet i have not idea why, can anyone please help... I have pasted two stylesheets that im using there is also a text one but i doubt that is the prob!! Code: body { margin:0px; padding:0px; font-family: Georgia; color:#333; background-color:#FFFFD2; } h1 { margin:0px 0px 15px 0px; padding:0px; font-size:28px; line-height:28px; font-weight:900; color:#ccc; } p { font:11px/20px Georgia; margin:0px 0px 16px 0px; padding:0px; } #Content>p {margin:0px;} #Content>p+p {text-indent:30px;} a { color:#ffffd2; font-size:13px; text-decoration:none; /*font-weight:600;*/ font: Georgia; } a:link {color:#ffffd2;} a:visited {color:#ffffd2;} a:hover {background-color:#A4AA54;} a.blue { color:#0000CC; font-size:11px; text-decoration:none; font-weight:600; font: Georgia; } a.blue:link {color:#0000CC;} a.blue:visited {color:#0000FF;} a.blue:hover {background-color:#eee;} #logodiv { position:absolute; top:6px; left:14px; width:91px; height:126px; background-image: url(../images/logo/gglogoweb.gif); background-position: 1% 2px; background-repeat:no-repeat; visibility: visible; z-index:1; } #slogandiv { position:absolute; top:0px; left:0px; width:100%; height:137px; background-color:#A4AA54; visibility: visible; z-index:0; /* This is a fix for IE% */ voice-family: "\"}\""; voice-family:inherit; height:137px; width:100%; /* the correct height */ } /* "be nice to Opera 5" */ body>#slogandiv {height:137px; width:100%;} #MenuBar { position:absolute; top: 136px; left:0px; width:100%; height:32px; padding-bottom:2px; background-color:#667138; border-bottom:0px solid #A4AA54; line-height:17px; z-index:1; /* Again, the ugly brilliant hack. */ voice-family: "\"}\""; voice-family:inherit; height:32px; } /* Again, "be nice to Opera 5". */ body>#MenuBar {width:100%; height:32px;} #Content { position:absolute; top: 175px; left: 185px; width: 81%; padding:15px; border: 0px solid #000000; background-color:#ffffd2; z-index:0; } body>#Content {width:81%;} #Menu { position:absolute; top: 166px; left:0px; width:150px; padding:10px; background-color:#667138; border-right:2px solid #A4AA54; border-top:0px solid #A4AA54; line-height:17px; /* Again, the ugly brilliant hack. */ voice-family: "\"}\""; voice-family:inherit; width:150px; } /* Again, "be nice to Opera 5". */ body>#Menu {width:150px;} and the other Code: /* CoolMenus 4 - default styles - do not edit */ .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* CoolMenus 4 - default styles - end */ /*Style for the background-bar .clBar{position:absolute; width:10; padding-right:10; height:10; background-color:#667138; layer-background-color:yellow; visibility:hidden} /*Styles for level 0*/ .clLevel0,.clLevel0over{position:absolute; padding-top:3px; font-family:georgia; font-size:12px; font-weight:bold; text-align:center; } .clLevel0{background-color:#667138; layer-background-color:#667138; color:#ffffd2;} .clLevel0over{background-color:#A4AA54; layer-background-color:#A4AA54; color:#ffffd2;; cursor:pointer; cursor:hand; } .clLevel0border{position:absolute; visibility:hidden; background-color:#667138; layer-background-color:#667138} /*Styles for level 1*/ .clLevel1, .clLevel1over{position:absolute; padding:2px; font-family:georgia; font-size:11px; text-align:center;} .clLevel1{background-color:#667138; layer-background-color:#667138; color:#ffffd2;} .clLevel1over{background-color:#A4AA43; layer-background-color:#A4AA54; color:#ffffd2; cursor:pointer; cursor:hand; } .clLevel1border{position:absolute; visibility:hidden; background-color:#A4AA54; layer-background-color:#A4AA54} /*Styles for level 2*/ .clLevel2, .clLevel2over{position:absolute; padding:2px; font-family:tahoma,arial,helvetica; font-size:10px; font-weight:bold; text-align:center;} .clLevel2{background-color:Navy; layer-background-color:Navy; color:white;} .clLevel2over{background-color:#0099cc; layer-background-color:#0099cc; color:#667138; cursor:pointer; cursor:hand; } .clLevel2border{position:absolute; visibility:hidden; background-color:#006699; layer-background-color:#006699}/* CSS Document */ i can paste the php file too if needed but it iwll have to be in another post because im running out of spce in this one!! If anyone can help that would be really appreciated! Thanks very much RF Here's the site in Question: http://www.winchps.vic.edu.au It's a standard fixed width floated DIV columns with a wrapper. One thing it does have is a second DIV inside both columns to display the Gradient background over the top of the repeated background. It works perfect in Firefox & IE7 (with a tweak) but IE6 mkes the sidebar nested div drop below the original sidebar DIV click here for a screenshot for those lucky enough not to have IE6. Here's the CSS code for the basic layout: Code: body { font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif; font-size: 12px; text-align: center; margin: 0px 0px 60px 0px; padding:0px; border: 0; line-height: 2; } #header { width: 802px; } #wrapper { width: 802px; margin:0px; padding: 0px; text-align: left; margin: 0 auto; background: url(images/bodybg.jpg) center repeat-y; } #content { padding: 0px; margin: 0px; } #maingrad { background: url(images/winchcontentgrad.jpg) top left repeat-x; padding: 10px; } #main { width: 589px; float: right; background: url(images/winchcontentbg.jpg) repeat; border-left: solid 1px #000; border-right: solid 1px #000; } #mainstop { width: 589px; float: right; background: url(images/winchcontentbg.jpg) repeat; border-left: solid 1px #000; border-right: solid 1px #000; border-bottom: solid 1px #000; font-size: 10px; } #sidebargrad { background: url(images/winchsidebargrad.jpg) top left repeat-x; padding: 10px 5px 0px 10px; } #sidebar { width: 200px; float: left; background: url(images/winchsidebg.jpg) repeat; line-height: 2; font-size: 14px; border-left: solid 1px #000; border-right: solid 1px #000; } I obviously need to put a conditional comment in there, same for what I did for the minor IE7 tweak, but I'm struggling to suss out what's causing it, I haven't found the specific issue on any of the regular sites (PIE etc). Anyone got any ideas? Centering DIVs inside other DIVs in Firefox? Can it be done in a straight forward way? Setting the inner DIVs float to none seemed to work for IE but not FF. The Example I've read a bunch about how div's won't stretch to accomidate div's inside of them if they overrun the height/min-height set for the container div. How do I get around this? You can see the skeleton of the site above. It's fine unless you resize the window smaller than the content. I want to use the following script found here. I want to alter it so that on rollover a DIV is shown instead of the IMG. Within the DIV will be the IMG and some copy. I have tried to do this but always end up with the rollovers not placing correctly, or the copy shows at all times. Thanks for the suggestions and help. Hi I am making a website where i have a main heading on all pages' start. I want to control its looks with CSS, i have an external CSS that controls links and body text etc. i have tried in external CSS Code: H2 { font-family: Arial; font-size: 14px; font-style: normal; font-weight: bold; color: #FFCC99; } and on pages i use <h2> heading is here </h2> but it doesnt make any difference and the main heading is also shown as the normal text of page body according to stylesheet. Please shed some light on this... thanks Hello everybody, I not an expert in CSS but getting better at it. I'm trying to control the look and feel of a table but its not working. Any help you can give me would be greatly appreciated. <div id="page-container"> <div class = "data_table"> have the table all setup and some css works and some done. </div> </div> Quote: <body> <div id="page-container"> <div class = "data_table"> <table width="760" border="1" cellpadding="0" cellspacing="0"> <tr> <th> Ticket # </th> <th> Description </th> <th> Created </th> </tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('http://www.yahoo.com/');"> <td> 473875 </td> <td> unable to install network card </td> <td> Dec.03.07 </td> </tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('http://www.microsoft.com/');"> <td> 474723 </td> <td> Need help setting up my router </td> <td> sept.03.07 </td> </tr> <tr onmouseover="ChangeColor(this, true);" onmouseout="ChangeColor(this, false);" onclick="DoNav('http://Imar.Spaanjaars.Com/');"> <td> 463175 </td> <td> Need microsoft word training</td> <td> Jan. 07.08 </td> </tr> </table> </div> </div> from external css file Quote: #data_table .table { border: 1px solid black; border-bottom: 1; border-left-style: solid; } #data_table .th { border: 1px solid black; border-bottom: 1 solid black; background: lightgreen; } #data_table .td { border-bottom: 1px solid black; border: 1; } Hi, I not very good at CSS and I need to create a page that shows divs in other order that are in the script: in my page i want to be something like this: Code: <body id="body" > <div id="bodyHolder" > <div id="mainHolder" > <div id="mainColumn">Here will be the main content</div> <div id="leftColumn" > Left Column</div> </div> <div id="topLogoHolder">Site Logo</div> <div id="topMenuHolder" > Top Menu</div > </div> <div id="footerHolder"> Footer</div> </div> but I want to show: Site Logo, Top Menu, Left Column, Main Column, Footer My problem is with Footer. I can't get to position at the bottom of page (not at the window) because the Main Column is not fixed. The CSS code is : Code: body {margin:auto; background:url('../imgs/bg.body.jpg') repeat-x; font-family:Arial, Helvetica, sans-serif; font-size:12px; background-color: #FFFFFF;} #bodyHolder {margin:auto; width:1006px; text-align:left;} #mainHolder {width:1006px; text-align:left; display:block; float:left; clear:both; background-color:#FFFFFF; margin:0px; padding:15px 0px 15px 0px; position:absolute; top:150px;} #mainColumn {text-align:left; display:block; float:right; margin-right:10px; width:810px;} #leftColumn {text-align:left; display:block; float:left; width:180px; } #topLogoHolder {width:1000px; text-align:left; display:inline; margin-left:6px; float:left; clear:both; height:112px; position:absolute; top:0px;} #topMenuHolder { text-align:left; display:block; margin:0px 0px 0px 6px; padding:0px; background:url('../imgs/bg.top_menu.jpg') no-repeat; width:1000px; height:38px;position:absolute; top:112px;} #footerHolder {margin:auto; background:url('../imgs/bg.footer.jpg') repeat-x; height:234px; font-family:Arial, Helvetica, sans-serif; padding:0px;width:100%; display: block; position: absolute; bottom:0px; height:100%; clear:both;} I really don't what to try (google gives me no clue... all my attempts failed ) I'll appreciate any help! Thanks a lot in advance Hello I know that on IE I can control the look of the scrollbar via: * scrollbar-face-color * scrollbar-highlight-color * scrollbar-shadow-color * scrollbar-3dlight-color * scrollbar-arrow-color * scrollbar-track-color * scrollbar-darkshadow-color Is it possible to control its look also in Firefox 1.0 and Opera 7.54? regards Hello I have the following CSS rule for some text: .Text { font-size:13; color:#2C506A; font-weight:bold; } When the browser renders it, it uses anti-aliasing to give it a better look. I am interesting in displaying the same text without anti-aliasing. Is this possbile via CSS? is there a way to tell the browser to not anti-alias the text? If so, how? regards Hello I am looking for the correct way to control the alignment of elements in my HTML page. in the old days, I used to add the <center> tag whenever I wanted to center some content. if I wanted to set the alignment of content inside a table cell, I would use <td align="left"> or <td align="center"> I also noticed the CSS rule text-align. My question is, what is the correct way to use CSS to align elements so that it adhere with strict DTD rules regards Hi, I am at this point too tired to continue to search for my answer, so I am going to just ask... I would like to be able to control the color and underlining of the links in the unordered list. This list will appear on every page in the site. I am not sure what the CSS code is or in which class/id to place it in my css file. the page code is: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <meta name="description" content=""/> <meta name="keywords" content=""/> <link rel="shortcut icon" href="" /> <link rel="stylesheet" type="text/css" href="style.css" /> <script src="nav.js" type="text/javascript"></script> <title>Natura Culina :: Welcome</title> </head> <body marginwidth="0" marginheight="0" style="margin: 0" onLoad="writeMenus()" onResize="if (isNS4) nsResizeHandler()" bgcolor="#D89607"> <div class="allcontent"> <div id="header"> <ul id="navigation"> <li><a href="index.php">home</a></li> <li><a href="products.php">products</a></li> <li><a href="ingredients.php">ingredients</a></li> <li><a href="about.php">about us</a></li> <li><a href="testimonials.php">testimonials</a></li> <li><a href="links.php">links</a></li> </ul><!---end navigation---> </div><!-- end header --> <div class="textArea"> <p align="center"><span class="header1">Welcome to Natura Culina Organic Skin Care </span></p> <p><br /> <img src="/images/all229.jpg" width="367" height="233" align="left" class="left" /><span class="bodyBold">Natura Culina</span> creates luxurious skin care products that will appeal to your senses, inspired by skin care traditions used at centuries old European Spas.</p> <p>We are <em><span class="bodyBold">so over</span></em> using chemical solutions for our skin problems because they are so unsatisfactory.<br> We are <em><span class="bodyBold">so back</span></em> to feeding our skin with natural ingredients, oils, vitamins and antioxidants.</p> <p>All the oils used in our products are cold pressed and certified organic. All our ingredients are carefully blended to create effective, nourishing and natural products for your skin. All body products are made after placing an order to assure freshness. </p> <p> </p><p> </p><p> </p> <p align="center"><em><span class="bodyBold">Start loving your skin again with Natura Culina Food For Your Skin.</span></em></p> </div><!---end contentBGColor---> </div><!---end allcontent---> </body> </html> and the CSS sheet code is this: Code: body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; background-color: #D89607; } #body { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; background-color: #E1A21A; } .allcontent { width: 736px; margin-left: auto; margin-right: auto; border: thin dotted; margin-top: 10px; } #header { background-image: url(/images/banner1.jpg); background-repeat: no-repeat; height: 260px; margin-top: -18px; } .textArea { background-color: #E1A21A; padding-top: 0px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; } #navigation li { float: left; list-style: none; padding-left: 20px; padding-right: 20px; padding-top: 240px; } #navigation { font-size: 16px; font-weight: bold; color: #fff; } img.left { padding: 0px 10px 0px 0px; float: left; } .header1 { font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold; } .bodyBold { font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; font-weight: bold; } .small { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #000000; } .itemBorder { border: 1px solid #73090E } .itemText { text-decoration: none; color: #F3F7FD; font: 14px Arial, Helvetica } .itemTextHeaders { text-decoration: none; color: #E6EBF2; font: bold normal 13px Verdana, Arial, Helvetica, sans-serif} Can I use CSS or javascript to control the page details of an IFRAME? Such as printing in landscape orientation? If it is possible, how? I'm loading a pdf document into my html document through an iframe. The document it is being embedded into is a layer that acts like a popup window who's width and height can be adjusted by dragging the window. I'm trying to have the iframe maintain 100% height, but can't seem to get it. <div style="height:350px;"> <iframe src="test.php" height="100%" width="100%"></iframe> </div> Now if I change the height from 350 to 100% on the div element, the iframe will resize to fit to 100% as the window is resized. However the downside to this is that when the iframe initially loads it's only about 50px in height. Suggestions on how to both maintain 100% and initialize at a fixed width? Hi there, Check out this screen shot: ...okay, I guess I can't attach a shot or paste a URL to the shot.. I'm using a hoverstate on a dropdown of orange with reverse text - I'm able to get both the background and the text to do what I want but I can't seem to control the WIDTH of the background. Here's where I'm controlling that backgound (orange) behind the dropdown items. #nav ul li a:hover { text-decoration:none; background-color:#d3862a; color: #ffffff; height: 15px; width: 100%; padding: 0px; margin: 0px; display:block; does anyone out there have any ideas? THANKS SO MUCH! Hi I have the html below and I only want to display the "initial text" and the "some more text" bits of text. Is this possible using only CSS without any modifications to the html e.g. adding id's ? <div id="snav"> <p><span id="somespan">You are he <a title="home page" href="/content/index.html">Home</a> <a href="http://www,saving.com">initial text here </a><br />Some more Text here.</span></p> </div> thanks. G |