HTML - Tag Id Anchor Gives Problems When Overflow:auto Used
I have a situation where I have to create a site of fixed width and (gulp) fixed height (I know, I know... client insists). So I've got a 'main content' div that is set to Overflow:Auto with css, so it provides a scroller inside the not-very-tall page, allowing me to accommodate a reasonable amount of text without forcing the vertical height to grow.
However, the content div is in the middle of the page and the content inside the div makes use of code fragment anchors (y'know, 'href="#thisHeading"' type links). They work, but the browser puts the jumped-to text at the top of the viewport, NOT at the top of the scrolling div, so the correct bit of text is hidden above the level of the scroller's top edge. Is there a way around this? TIA Similar TutorialsHi Everyone, I have a div element on a page that has as a child a large node (content is "Ajax'd" into this child). The containing DIV has overflow : auto so that the user can scroll up and down the large content. The function of the containing DIV is simply to provide scrollability and the dimensions of that DIV shouldn't affect the dimensions of it's content. When I use an IFRAME to provide the scrollability, resizing the IFRAME is fine. The desired effect is to make this look like an IFRAME in effect, it is in effect supposed to look like a desktop app with a multiple document type pane. This is a crap idea I know, but it's outwith our hands. So we can't radically change the way that the produt looks at the moment. When I use the DIV, then resizing this must cause the browser to recalculate all of the childrens widths which takes ages. Does anyone have any suggestions apart from using an IFRAME for this ? What I want is to be able to resize the containing element without recalculating the widths of all its children. The document div with the scroll bars is held inside a Dojo ContentPane widget with resizable borders hence the noticeable redraw lag when the user changes the size of something. many thanks, Woody. A little out of my depth here, and my site is based on a DW template. I have a photo section with thumbnails, that is expanding. I have gone from 10 rows to 30, and in the process broken something. I have compared the code from my original 10 rows to the 30 and cannot find anything that would cause the issue, so am hoping for some help. http://www.uniquefinishing.co.uk/photopages/photos.html On the top horizontal menu, click on "Videos", then "photos". See the table has dropped? This is the only consistent replication of the issue I can find. If you now keep clicking on the same "photos" link on the top menu, it randomly drops and fixes itself occasionally. This happens randomly from any page to the "photos" page. Where should I be looking? Hello, I am currently making a vBulletin skin, and was wondering if there were any alternative to overflow: auto? The thing is, I'm trying to create a sidebar without tables AND with a fluid wrapper. My CSS code looks like this: Code: #wrapper { width: 90%; min-width: 980px; margin: 10px auto 0 auto; background: #1a1a1a url(images/magnetic/style/wrapper.png) repeat-x top left; border: 1px solid #161616; overflow-x: hidden; -moz-border-radius: 8px 8px 8px 8px; -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px; } #right-content { float: right; width: 275px; color: #7a7a7a; padding: 15px 0; } #left-content { margin: 0px 0 0 0; background: #e9ecee url(images/magnetic/style/bg-main.gif); padding: 0px; min-height: 800px; overflow: auto; overflow-x: hidden; -moz-border-radius: 8px 8px 8px 8px; -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-border-top-left-radius: 8px; -webkit-border-top-right-radius: 8px; } And here's what the HTML looks like: Code: <div id='wrapper'> <div id='right-content'> Right content (sidebar) here <!--end right--></div> <div id='left-content'> The left content here </div> </div> The thing is, when the overflow:auto is there, the page looks fine BUT it has issues when opening, for example, dropdown menu or expanding a big image. Here's what it does when opening a dropdown menu: Here's what it does when trying to open an image: http://img689.imageshack.us/img689/9...340problem.gif So what I'm trying to do, is to create a fluid layout with a right sidebar without tables. It's working, although I'm looking for some code modifications so it doesn't have issues with the dropdowns etc. Basically, it seems that everything looks fine BUT when we open something that is "larger" than the #left-content ID. Then it creates issues. Any idea? Thank you so much in advance. im rather new to html coding so forgive me for being so nub at this. I have a website for my friend and i thought by making the navigation menu have a mouse over effect it would help make the website a lot more presentable. i used this technique to create the mouse over effect. i then used this technique to pre-cache the images onto the user's pc so that the images don't flash when first hovered over. everything seemed to work fine on my computer (i used firefox 3.x) but then i loaded up the page on internet explorer 8.x.. at first the image mouse hovers work fine but when the image is clicked the image dissapears and is replaced by text. i added a:name:visited to fix that issue but now after it is clicked the hover stops working.. is there any way to fix this? here is the website so you can open it with iexplorer and see what i mean.. just click any of the navigation buttons. Analog Knights So I just decided to redesign my website, and I learned the wonders of "position: absolute" and the left, right, top, and bottom CSS tags. But of course, with that comes some issues (and other things, like me having to think about people with different browsers/resolution settings than me). Some of my problems are as follows (captions of the problem are under the images) When the text overflows here, it just leaves the <div> tag... well... multiple <div> tags. This one takes the body <div> with it.. but doesn't let the bottom page image extend down. Top filler image doesn't extend all the way, body <div> doesn't connect properly to fade images. So as you can see, my big problem is the overflow, which really needs to be fixed. Don't know what the problem is with Opera there, but it's something else that should be checked out. So anyway, here's my code for the website. If you have any ideas for how to improve it/make it work better, then I'm happy with that. Don't worry about validation right now, though. I'm saving that for later. HTML Code: <html> <head> <title>Home - Alex Crooks Webdesign</title> <style type="text/css"> body { margin: 0px; background-color: #035b07; font-size: 10pt; color: white; font-family: verdana, arial, sans-serif; } a { text-decoration: none; color: white; } a:hover { text-decoration: underline; color: white; } img { border: 0px; } .navlink { font-size: 16pt; font-variant: small-caps; font-weight: bold; } #navlinks { text-align: right; vertical-align: middle; padding: 5px 10px 0px 10px; } #topleft { position: absolute; top: 0px; left: 0px; float: left; width: 141px; height: 228px; background-image: url(topleft.gif); z-index: -11; } #topfiller { position: absolute; top: 0px; width: 100%; height: 155px; background-image: url(topfiller.gif); z-index: -12; } #left { float: left; position: absolute; left: 0px; width: 65px; height: 100%; background-image: url(leftfiller.gif); z-index: -13; } #bottomleft { position: absolute; bottom: 0px; left: 0px; float: left; width: 137px; height: 134px; background-image: url(bottomleft.gif); z-index: -11; } #bottomfiller { position: absolute; bottom: 0px; width: 100%; height: 67px; background-image: url(bottomfiller.gif); z-index: -12; } #nav { margin: 100px 0px 0px 65px; margin-top: 100px; height: 40px; width: auto; background-image: url(navbg.gif); color: white; } .sep { vertical-align: middle; width: 2px; height: 25px; padding: 0px 5px 0px 5px; } #bodyright { position: absolute; top: 273px; right: 200px; bottom: 104px; height: auto; width: 22px; background-image: url(bodyright.gif); z-index: -7; } #body { padding: 5px 5px 5px 5px; position: absolute; top: 273px; right: 221px; bottom: 104px; left: 200px; width: auto; height: auto; background-color: white; color: black; z-index: 0; } #bodybottom { float: left; position: absolute; left: 246px; right: 221px; bottom: 87px; left: 200px; width: auto; height: 17px; background-image: url(bodybottom.gif); z-index: -7; } #bodycornerleft { position: absolute; bottom: 87px; left: 200px; width: 46px; height: 18px; background-image: url(bodycorner1.gif); z-index: -6; } #bodycornerright { position: absolute; right: 205px; bottom: 87px; width: 17px; height: 17px; background-image: url(bodycorner2.gif); z-index: -7; } </style> </head> <body> <div id="left"></div> <div id="top"> <a href="index2.html"><img style="padding: 5px 0px 0px 5px;" src="crookslogo.png" /></a> <div id="topleft"></div> <div id="topfiller"></div> </div> <div id="nav"> <div id="navlinks"> <a class="navlink" href="">Home</a> <img class="sep" src="navseparate.gif" /> <a class="navlink" href="">Features</a> <img class="sep" src="navseparate.gif" /> <a class="navlink" href="">Blog</a> <img class="sep" src="navseparate.gif" /> <a class="navlink" href="">Clients</a> <img class="sep" src="navseparate.gif" /> <a class="navlink" href="">Products</a> </div> </div> <div id="content"> <div id="body"> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent ac enim sapien, vel tristique sapien. Vivamus erat purus, feugiat non porttitor id, cursus at sapien. Curabitur eleifend, leo facilisis consequat faucibus, ante eros bibendum tellus, et dictum nibh mi laoreet turpis. Proin pellentesque, nulla et ornare pretium, ipsum lectus faucibus mi, sed dictum purus ipsum a ante. Aenean nibh odio, porttitor a volutpat ut, euismod vitae nisi. Integer urna turpis, ultrices ullamcorper porttitor in, placerat ut metus. Sed venenatis nisl in elit faucibus non consectetur quam commodo. Pellentesque ut augue massa, ac iaculis elit. Integer eu quam nisi, non faucibus neque. Donec sit amet magna at nulla commodo cursus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec tellus mauris, congue ut lobortis nec, adipiscing eu arcu. Suspendisse congue consectetur ante at porttitor. Maecenas sapien nibh, porttitor non pellentesque sed, sodales eu dui. </p> <p> Nullam sodales malesuada lorem, et cursus velit malesuada nec. Phasellus vestibulum elit quis nunc semper vel accumsan dui lobortis. Nunc viverra tortor tincidunt dolor congue quis porta tortor auctor. Sed porta neque ac libero tristique varius. Nam id nisi lectus. Integer consectetur magna id erat volutpat adipiscing. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer risus sem, interdum sed eleifend at, tincidunt in odio. Vestibulum euismod mauris eget magna semper sit amet feugiat risus varius. Mauris non neque et arcu ultricies venenatis a non mauris. Nulla facilisi. Donec sem turpis, porttitor et posuere id, posuere eget diam. Vestibulum et aliquam nibh. Phasellus quis ligula mauris, non porttitor sapien. Duis eu est id elit blandit vestibulum quis non urna. Maecenas enim augue, cursus faucibus tincidunt eget, cursus sed sem. Curabitur dictum dolor id massa bibendum vel tincidunt nunc volutpat. Nunc lobortis augue vitae ante porta eget mattis nisl faucibus. Ut sodales lorem vel dolor malesuada bibendum. Maecenas eget neque in elit semper rhoncus. </p> <p> Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec aliquet semper volutpat. Suspendisse vitae sapien pulvinar mi egestas ornare quis nec sapien. Pellentesque nec ipsum ligula, sed ultricies lectus. Duis eu ipsum et dui vehicula luctus. Sed mollis rutrum dui elementum consectetur. Nunc viverra tortor quis tellus semper a imperdiet nisl suscipit. Nullam et dolor at purus dignissim faucibus eu vitae quam. Proin lacus ante, tempus ut ullamcorper id, mattis vitae eros. Vivamus mauris lorem, interdum at ultrices in, ultrices non metus. Phasellus convallis lobortis sem, sit amet convallis ante dignissim in. Nullam id mollis nibh. Pellentesque lobortis convallis erat, suscipit lobortis velit euismod ultricies. </p> <p> Cras mollis imperdiet dignissim. Nulla sit amet elementum dolor. Curabitur luctus vestibulum sodales. Quisque eu odio velit, et pretium diam. Maecenas porttitor metus et mauris mattis sit amet facilisis odio sagittis. Aenean at turpis ac sapien ultrices pellentesque vel id erat. In ultrices pharetra erat, pulvinar molestie nisi hendrerit id. Mauris nunc eros, consequat in ultrices sed, malesuada non magna. Etiam dictum ultricies blandit. Vestibulum augue ipsum, malesuada a ullamcorper vel, porta accumsan nunc. Quisque dapibus posuere neque, sit amet lacinia justo tempus nec. Curabitur sit amet tortor nulla. Sed enim quam, facilisis eu dapibus quis, vestibulum at erat. Cras placerat sagittis eros, ac faucibus tellus ultricies vitae. </p> <p> Aenean commodo enim facilisis tellus lacinia sit amet vulputate est condimentum. Vivamus viverra vehicula felis sed rhoncus. Donec sed imperdiet est. Proin molestie velit nec urna lacinia vel fermentum sem tincidunt. Maecenas rutrum sollicitudin varius. Donec et ligula semper eros euismod interdum. Aenean ultricies magna sed nisl consectetur venenatis. Nullam quis orci sapien. Curabitur pellentesque lacinia ante, id pharetra risus sagittis id. Etiam metus turpis, rutrum vel faucibus nec, feugiat rutrum nibh. Donec fringilla sagittis ligula, nec varius felis dapibus eu. Curabitur felis quam, fermentum non eleifend ac, faucibus vel libero. In nec leo ut nulla sagittis scelerisque nec in orci. </p> </div> <div id="bodyright"></div> <div id="bodycornerleft"></div> <div id="bodybottom"></div> <div id="bodycornerright"></div> </div> <div id="bottom"> <div id="bottomleft"></div> <div id="bottomfiller"></div> </div> </body> </html> Is there anyway to do a sort of "go to next anchor" link? ... and previous anchor? Using help from (http://www.echoecho.com/htmllinks08.htm) I added links to my page (http://laititudefestival.zxq.net/whosplaying.html) When clicked on the title 'Lake Stage' it should redirect you to the line up image lower down in the page. The link (http://laititudefestival.zxq.net/whosplaying.html#lake) appears in the address bar . It should move the page down but it dosent Please help Just give me one working example I would be very happy I could change text and so on ! Thanks , Sorry for English Hi all, I'm trying to embed a flash file on my page that will act as a link to another page (please see code below). However, for some reason it's not working. Can someone please tell me what I'm doing wrong or point me towards some documentation? <div class="promowrapper"> <a href="http://promos.kansan.com/summersplash"><embed width="955" height="60" src="http://media.kansan.com/static/images/SummerSplash.swf" /></a> </div> Thanks, Kansan so i have these 3 files, frame.html, menu.html, and page.html frame.html sets up the frameset with menu.html on the left side and page.html on the right side. the page is very large and scrolls and has a bunch of named anchors in it, and the menu doesn't scroll so its always visible no matter where on the page you are. so u probably get the idea by now. normally if i want to have an anchor link in the page i would just say href="#anchorname", but instead i want to have links in the menu frame jump to anchors in the page frame, so that someone could browse the page very easily without having to scroll all the way back to the top for all the anchor links. is that possible, and how would i do it? I'm creating an alphabetical search of products. I have a table with the letters of the alphabet and just below that table I have a scroll box with the list of products. Each section of this list of product has an anchor that is called by the letter in the table. When the letter is clicked the scroll box scrolls to show the products with names starting with that letter. What I did so far is working. The problem is that the whole page of the website is moving up when I click a letter and not just the scroll box. How do I do to make just the scroll box to scroll? Hi everybody, im new here. i've done lot of search and nothing solved my problem. here is my situation. I have 2 pages, in the first page i want to make a link to the second page but at a specific point in the second page. Here is my code: in the first page, i make this link: <a href="page2.html#70" class="Style1">linktopage2 (1)</a> in the second page at the point i want to link: <a name="70"></a> Did i forget something? right now when i click the link in the first page, it open the second but at the top of it and not at the point i want. someone have a better way to do what i want? thank you all!! mike Hey guys, I'm really new to HTML coding so be nice. I'm trying create an anchor on a new page. Is this possible, I can create an anchor that jumps down a page, but I can't get it to work on a different page. I thought I had it, but it only worked in Safari, and wouldn't work in Firefox or IE. Any help would be greatly appreciated Right this is not for the faint-hearted cos I'm going to make a real hash of explaining what I'm trying to do probably I'm using <a> tags to move the user around a single page, so for example: HTML Code: <a href="#room1">Room1</a> <a href="#room2">Room2</a> <a href="#room3">Room3</a> <a href="#room4">Room4</a> <div id="room1"> Some Content </div> <div id="room2"> Some Content </div> <div id="room3"> Some Content </div> <div id="room4"> Some Content </div> It works fine, but the browser places the viewing window right at the very start of the <div id=""> bit. I want to have it move to say 50px higher up. I can't move the <div> tags or set any margin or padding on them as this really messes up the page. Is there any way to move the browser window 50px back up after it has moved to the <div> position. Maybe using javascript? Any help really appreciated Hello, I have a webpage with several html anchors. The anchor part works ok, but when I click on the links, I only goto to the part of the page with all the anchors (all anchors are gathered low in the page) and I wanted to know if there is any way of highlighting the specific anchor that the user has clicked on. Thank you. I would like to show some details in table format inside the anchor link, is this possible or not... How do I make an H1 heading (example: <h1>Business to Business</h1>) into a link that will jump to an anchor lower on the page? What is the code for this? HELP! Any help would be much appreciated Karen So I have this table, and I'm trying to get the overflow to work, but it's not working. Everytime I put a bunch of words it just streches and goes out of the specific height I want it to be at. Can someone help me? Make it where it overflows? Ppllleeassee. Here's my code. <table id="maintable"> <tr> <td colspan="2" width="303px" height="155px" class="words" overflow="auto"> 1111 </td> <td colspan="1" width="150px" height="155px" class="words"> 555 </td> <td colspan="1" rowspan="2" width="150px" height="205px" class="words"> 888 </td> </tr> <tr> <td colspan="1" rowspan="4" width="150px" height="300px" class="words"> 222 </td> <td colspan="1" rowspan="2" width="150px" height="150px" class="words"> 333 </td> <td colspan="1" rowspan="2" width="150px" height="150px" class="words"> 666 </td> </tr> <tr> <td colspan="1" rowspan="2" width="150px" height="125px" class="words"> 9999 </td> </tr> <tr> <td colspan="2" rowspan="4" width="300px" height="150px" class="words"> 4444 </td> </tr> <tr> <td colspan="1" width="150px" height="125px" class="words"> 777 </td> </tr> </table> <style type="text/css"> table#maintable { background-color:#222222; border: 2px solid #FF0099; } table#maintable td { padding: 5px; border: 1px solid #FF0099; vertical-align: top; text-align: left; } .words { color: #FFFFFF; } </style> Hello, I have one problem with overflow in IE, the problem results from having height of my div determined in % I guess. If I change it to fixed size in px I have no problems Here is the code : Code: <style type="text/css"> ... div.text { font-size: relative; width:85%; height:57%; overflow-y:scroll; } ... </style> <div class="text"> .... </div> I need the size of this div to be set in % and overflow to work, can I do that in any way ? (this woks nice in firefox, however not in IE6) Thank you!! |