CSS - Image Won't Scroll With Text In Ie6/7
I have two divs that are set to scroll if there is more content than can be viewed in the div. The problem is IE6/7.
This works perfectly in FF. All of the contents in the boxes scrolls nicely together. However, in IE6/7, the image at the top just sits there. The text scrolls up and gets lost in the image (they are the same color). I can't tell if the text is on top of or below the image, but that is probably irrelevant. The page can be seen at www dot bordertownband dot us/test/index.php. Sorry, but my URL's seem to be blocked. Here is the CSS code for one of the boxes (they are coded the same): .contentbox { background: #FAFAED; border: 1px solid #787650; width: 461px; height: 100%; margin: 0; float: left; overflow-x: hidden; overflow-y: auto; } .contentbox #contentboxtext { width: 437px; margin: 10px; } .contentbox #contentboxtext img { margin-bottom: 10px; } Here is the HTML code: <div id="contentboxtext"> <img src="images/welcome_to_bordertown_head.png" width="432" height="22" alt="Bordertown Band Party Band Classic Rock Modern Rock Parties Weddings Wedding Receptions Birthday Parties"> <p>Bordertown was formed by a group of experienced musicians who wanted to have fun by playing songs they like and that they grew up with. Here is a list of songs Bordertown is working on now. Bordertown will add life to any atmosphere such as wedding receptions, restaurants, coffee shops, concerts, birthday parties, bar mitzvahs, political rallies, whatever!</p> <p>Bordertown is always available but never free! (that's a joke)</p> <ul> <li>Bad Day - Daniel Powter</li> <li>Don't Stop - Fleetwood Mac</li> <li>Falling In Love At A Coffee Shop - Landon Pigg</li> <li>Have A Nice Day - Bon Jovi</li> <li>How To Save A Life - The Fray</li> <li>Jammin' Me - Tom Petty</li> <li>Over My Head (Cable Car) - The Fray</li> <li>Stop And Stare - OneRepublic</li> <li>True Lies - Kenny Wayne Shepherd</li> <li>Wanted Dead Or Alive - Bon Jovi</li> </ul> </div> Any help would be greatly appreciated. Similar TutorialsLink To Site Dear CSS Guruz If you goto this page in IE and scroll down you will notice the text "Power, Safety, Simplicity, etc" Dissapears! This does not happen in Firefox. It could be a javascript issue but Im not really sure. Anybody have any clues what could cause this? Louis I'm at a loss because I'm not very familiar with css... this page www.centerpointpilates.com/index.html has pricing formatted by line 42 of the code at the very bottom of this post, printed out here by itself: Code: #main #plans { position: relative; float: right; width: 220px; background-color: transparent; border: 1px solid #6B9D98; margin: 0px 0px 10px 10px; left: 428px; top: 29px; } I've done something but I'm unaware of what! The text within the div using this now goes off the screen, all the way to the right! Can anyone tell me why? I'm printing the whole css sheet below, the above code is line 42. If I can't figure this out tonight I'm going to just redo the page using tables until I can find what is wrong. Code: body { background-color: #F6EEC2; margin: 10px; padding: 0px; } #bannerBox { background-color: transparent; background-image: url(gfx/cpp_banner2.jpg); background-repeat: no-repeat; border: none; padding-left: 5px; height: 80px; margin: 0px; } #leftNav { position: absolute; left: 10px; top: 100px; width: 130px; background-color: transparent; } #navBlock { position: relative; left: 7px; width: 110px; background-color: transparent; border: 1px solid #6B9D98; } #main { background-color: transparent; position: relative; margin-top: 5px; margin-left: 138px; margin-right: 0px; border-left: 1px solid #6B9D98; voice-family: "\"}\""; voice-family: inherit; margin-left: 137px; margin-right: 0px; } html>body #main { margin-left: 139px; margin-right: 0px; } #main #plans { position: relative; float: right; width: 220px; background-color: transparent; border: 1px solid #6B9D98; margin: 0px 0px 10px 10px; left: 428px; top: 29px; } #tagLine { background-color: transparent; border: none; margin: 0px; padding-top: 10px; padding-bottom: 50px; } IMG { position: relative; float: right; border: 0px; padding-left: 20px; padding-top: 0px; padding-right: 10px; padding-bottom: 10px; } P,H1,H2 { margin: 0px 10px 0px 10px; } H1 { font: bold 16px "arial"; color: #6B9D98; letter-spacing: 0px; padding-left: 5px; padding-top: 3px; padding-bottom: 10px; } H2 { font: bold 14px "arial"; color: #6B9D98; letter-spacing: 0px; padding-top: 10px; padding-bottom: 13px; } #leftNav P { padding-top: 6px; margin: 0px 10px 0px 10px; } #leftNav P.spacer { padding-bottom: 15px; } #navBlock P { font: bold 11px arial; color: #6B9D98; padding-top: 1px; padding-bottom: 1px; } #main P { text-align: justify; font: 11px arial; color: #6B9D98; line-height: 17px; padding-left: 10px; padding-bottom: 10px; } #main P.head { font: bold 12px arial; color: #6B9D98; padding-left: 10px; padding-bottom: 3px; } #plans P { font: 12px "arial"; color: #6B9D98; padding-left: 10px; padding-bottom: 3px; } #plans P.list { text-align: justify; font: bold 10px arial; color: #6B9D98; width: 150px; padding-left: 15px; padding-bottom: 5px; } #plans P.list2 { text-align: justify; font: bold 10px arial; color: #6B9D98; width: 180px; padding-left: 15px; padding-bottom: 5px; } #plans P.price { font: 11px arial; color: #6B9D98; padding-left: 15px; padding-bottom: 1px; } #tagLine P { font: italic 11px arial; color: #6B9D98; padding-bottom: 3px; } #tagLine P.copy { font:11px "lucida console"; color: #6B9D98; padding-top: 5px; } A.nav:link { text-decoration: none; background-color: transparent; color: #6B9D98; font: bold 11px arial; } A.nav:visited { text-decoration: none; background color: transparent; color: #6B9D98; font: bold 11px arial; } A.nav:hover { text-decoration: none; background-color: transparent; color: #6B9D98; font: bold 11px arial; } A.reg:link { text-decoration: none; background-color: transparent; color: #6B9D98; border-bottom: 1px solid #8DBFBA; } A.reg:visited { text-decoration: none; background-color: transparent; color: #8DBFBA; border-bottom: 1px solid #8DBFBA; } A.reg:hover { text-decoration: none; background-color: transparent; color: #8DBFBA; border-bottom: none; } I know almost nothing about css, but i was using other codes to try and make something i wanted... .. Yea, well it didn't work out. heh. I want to have a scroll box within an image. Like in video games where when you read something a scroll pops up, and you can scroll the text but the image doesnt move or anything. This was the code i was trying to change.. It is for myspace, it puts all of the comments in a scroll box. But i dont need to it for that, i want to put regualr text in it. Code: <style type="text/css"> td.text td.text table td, td.text td.text table {height:0;padding:0;border:0;} td.text td.text table {background-color:transparent!important} td.text td.text table td {font-size:13} td.text td.text table table br {display:inline;} td.text td.text table b, td.text td.text table table td {font-size:8pt} td.text td.text table table td {padding:2;} td.text td.text {height:0} td.text td.text table table table, td.text td.text table br, .rid br, td.text td.text table .orangetext15, td.text td.text .redlink, td.text td.text span.btext {display:none;} </style> </td></tr></table></td></tr></table><br> <table class="rid"> <tr><td><table style="display:none"> <tr><td><table><tr><td> <style type="text/css"> td.text td.text table table table, td.text td.text table br, td.text td.text table .orangetext15, td.text td.text .redlink, .rid br, td.text td.text span.btext {display:none;} table[id*="Friends"] {display:none;} td.text td.text table td, td.text td.text table {height:0; padding:0; border:0;} td.text td.text table {background-color:transparent!important;} td.text td.text table td {font-size:10;} td.text td.text {height:0;} .r4wr table table table {width:auto!important} td.text td.text table b, td.text td.text table table td {font-size:10pt;} l{note: comment padding fix;} td.text td.text table table td {padding:3px;} td.text td.text table table br {display:inline;} l{note: scrollable comments;} .rid {display:block; width:433px; height:462px; overflow:auto;} </style> </td></tr></table></td></tr></table> </div><br> <div class="rid"> <table style="display:none"><tr><td><table><tr><td> The image i want to place it in is 380 by 466 pixels.. Er... any broken rules i apologize for.. Uhm, thanks.. -woe I there I have a background image on my forum (goto goldeninja.co.nr and click the forum link on the nav bar) the background image are 2 ninjas resting against the sides of the board. I want them to scroll down when someone uses the scroll bar on the side of there browser... Example: goto SnedenkerDesigns.webs.com and look at the bottom of the page. It shows a ribbon. Now scroll down and it will follow your scroll. I want that scroll follow to work with my ninjas. What is the CSS code for that? hey. not sure If i can complete this in CSS, I know how to do a singular image scroll over change, but I have a navigation bar i am creating, with about 9 links across is. I want to have the image change as the mouse scrolls over each link option, so an image map navigation bar with multiple scroll over changes.... how is this possible... it must be some how... I'm currently using Dreamweaver cs4 for my site, although I do have a medium to basic knowledge of html and CSS, so I can adapt coding. any help or pointers would be great. I have a website im developing and I wanted to know how i would go about having a graphic element that floats on top of everything but if it goes outside the bounds of the window it wont introduce scroll bars. Reason: I have an image that i want to make quite long but its not important for the viewer to see the end of the image. I guess its a bit like a background image but on the top Thanks Good Morning All, Been having a slight problem with the visual in the screenshot below. The blue line is our H2, and the purple one is our H3, however, as you can see, the underline spans the entire width of the column, not just underneith the text, which is our requirement. ***As i am not allowed to upload a url as a new user, the underline is as follows. With the text centre aligned. text ----------------------------------------------------------- rather than text ------ and obviously by the css, the underline on the headers is a small image, repeated - x. Please see relevant css information. * (line 23) { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; } h2, h3, h4, h5, h6 (line 101) { font-size: 1.2em; font-weight: normal; padding-bottom: 4px; margin-top: 0.6em; margin-right: 0pt; margin-bottom: 0.8em; margin-left: 0pt; text-align: center; } .contentArea h2, #secondaryNavigation h2 (line 114) { background-color: transparent; background-image: url("../images/h2_gradient_bg.gif"); background-repeat: repeat-x; background-attachment: scroll; background-position: left bottom; color: #0066cc; } Many Thanks in advance. Marc. Hi. See code below. Why does the outer SPAN in TABLE not grow with the image height. If the text is longer so it is forced below image then it looks as it should. Please also read some comments in the code. Code: <html><body><center><br><br> Why does image not force the outermost span to be at least as high as image?<br> If the text are long enough and gets below the bottom border of image it look good though.<br><br> NOTE: I need to put Image and text either within separate span or in same span as the examples below.<br> In my real application I'm using an <a href=" ...> around the outer span in examples below.<br> <br><br> <table border=1 cellpadding=0 cellspacing=0 width=200px><tr><td> <span style="display:block; background-color:#ffa827; padding-top:10px; padding-left:10px; padding-right:10px;"> <span style="display:block; float:left"> <img src="landscape.jpg" height="40px" width="40px" alt="" border="0"> </span> <span style="display: block; color: white;"> Text here. </span> </span> </td></tr></table> <br><br> <table border=1 cellpadding=0 cellspacing=0 width=200px><tr><td> <span style="display:block; background-color:#ffa827; padding-top:10px; padding-left:10px; padding-right:10px; color: white;"> <img src="landscape.jpg" height="40px" width="40px" alt="" border="0" style="float:left"> Text here. </span> </td></tr></table> </center></body></html> How do I get a seperate scroll bar for the text on my website? Hi. Really hoping someone can help me with this... I'll try and explain this as best I can(!) Basically I've got a page containing a block of 9 images, with each linking to a video clip. At the moment I've got the CSS coded so that whenever the mouse is hovered over the 'infobar' (at the bottom of each image) it goes from having a transparent background with black text to having a grey background with white text. What I'm trying to achieve is that same effect whenever the mouse is hovered over any part of the image and infobar. The live online link can be found at: www.markmcm.co.uk/test/test.html The CSS is as as follows: Code: /* * Page Stylesheet */ body { font-family: Arial, Helvetica, sans-serif; background-color: #eaeaea; border:0; margin:0; padding:0; height: 100%; } a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } #container { margin-left: auto; margin-right: auto; min-height: 100%; width: 936px; } * html #container { height: 100%; } #content { float:left; position: relative; height: 528px; width: 936px; z-index: 0; } .miniscreen1, .miniscreen2, .miniscreen3, .miniscreen4, .miniscreen5, .miniscreen6, .miniscreen7, .miniscreen8, .miniscreen9 { position: absolute; float: left; display: block; width: 312px; height: 176px; } .miniscreen1 { top: 0; left: 0; } .miniscreen2 { top:0; left: 312px; } .miniscreen3 { top: 0; left: 624px; } .miniscreen4 { left: 0; top:176px; } .miniscreen5 { left: 312px; top:176px; } .miniscreen6 { left: 624px; top:176px; } .miniscreen7 { left: 0; top:352px; } .miniscreen8 { left: 312px; top:352px; } .miniscreen9 { left: 624px; top:352px; } .info { height: 30px; top:3px; left: 40px; width: 265px; float: left; position: absolute; } .infobar { left:0px; position: absolute; top: 140px; width: 312px; height: 36px; outline: none; color:#000; background: url("data/infobar.png") no-repeat 0 0; z-index: 650; } .infobar:hover { background-position: 0 -36px; outline: none; color:#fff; } #infobar span { display: none; outline: none; } .clip_title { outline: none; font-size: 85%; font-weight: 700; vertical-align: top; text-align: left; } .clip_sub { outline: none; height: 13px; font-size: 80%; line-height: 13px; font-weight: 700; vertical-align: top; text-align: left; } And the HTML is: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Test Page</title> <meta name="description" content=" " /> <meta name="keywords" content=" " /> <meta name="generator" content=" " /> <link rel="stylesheet" type="text/css" href="page.css" media="screen" /> </head> <body> <div id="container"> <div id="content"> <span class="miniscreen1"> <a href="#"> <img src="img/clip1.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 1<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen2"> <a href="#"><img src="img/clip2.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 2<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen3"> <a href="#"><img src="img/clip3.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 3<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen4"> <a href="#"><img src="img/clip4.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 4<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen5"> <a href="#"><img src="img/clip5.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 5<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen6"> <a href="#"><img src="img/clip6.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 6<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen7"> <a href="#"><img src="img/clip7.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 7<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen8"> <a href="#"><img src="img/clip8.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 8<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> <span class="miniscreen9"> <a href="#"><img src="img/clip9.jpg" width="312" height="176" border="0"> <span class="infobar"><span class="info clip_title">Test Clip 9<br><span class="clip_sub">123 Productions</span></span></span></a> </span></span> </div> </div> </body> </html> There must be a better (and easier?) way to do this. Any help would be very-much appreciated - and save an old bloke from tearing too much of his hair out(!) Hi I am redesigning my blog and took it down completely. I want to place the day's text post on the day's photo post on top of the latter, while graying out the photo. Is that possible without using flash? Figured this was simple, but I can't seem to figure it out. Using CSS, I want to put an image on the left with text to the right aligned to the bottom. I could easily do this with a table, but I'd like to find a CSS way. With CSS like: .imginfo {float:none;clear:both;margin-top:1em;} .imginfo img {float:left;margin-right:1em;} and code like: Code: <div class="imginfo"> <img src="..." /> Line of Text<br /> Line of Text<br /> Line of Text<br /> </div> I get the image on the left and the text on the right, but, the text starts at the top of the image. I want it to end up aligned to the bottom of the image. Attempting to use vertical-align: bottom doesn't do anything with the text. The effect I am looking for is like below. If you assume the XXX are the image... Code: XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXX Line of Text XXXXXXXXXXXX Line of Text XXXXXXXXXXXX Line of Text Hello. So I have this situation (on the right): h t t p : / / img339.imageshack.us/img339/6958/1stb.png and when I change my browser resolution, I get this (on the right): h t t p : / / img35.imageshack.us/img35/3892/2ndhw.png Is it possible to do that the image wouldn't change the place on a screen even you when change the resolution of the browser? And yes, the image must be behind the text. Thanks in advance for any suggestions and tips. I am trying to put labels below images on my new site design. See: www.jwsuretybonds*com/jw09 I figured out how to get them vertically aligned, but I am having problems with the horizontal, as when I change the browser size, they move. Here is one of the examples: Code: #homepage-bar h2.construction { position:fixed; top:225px; left:505px; } I tried changing to position: absolute; I also tried to use percentages on the left: I know this is easy, but I can't find the fix after googling for 30 minutes. Help! 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 Hello all, I have this code that works well on IE and not on FF , I simple want to have the text to have a background image. Code: <img style="position:absolute; z-index:0;" src="images1.gif" alt="" /> <p style="position:absolute; z-index:1"> <% response.Write("This text has a background image from images1.gif") %> </p> What is the css to make it so text sits next to an image rather than automatically being placed underneath. Im not really sure how to explain it. I do know that before i made use of hspace and align to make it work... I'm trying to do a layout like this: wink zone. net / ap.jpg I know how to do the header part of it but the end of the image of the person and the text parts are bit harder. Could you give me some help? I guess the best way to do this is use floats? Hey folks, if you look at this page in FF, it's doing what i want. Specifically, the first bike is 'SOLD'. However, in IE it displaces the magnifying glass/info icon, as well as the text in the box. How do i got about positioning the text so it doesn't do that? Here's the CSS; Code: .sold { position:relative; top:-115px; left:10px; z-index:100; color:#ff0000; font-size:60px; font-weight:bold; } * html .sold { left:-190px; top:-50px; height:1%; } Thanks! |