CSS - Horizontal Scrolling Text With Css/javascript
I'm trying to make one of my current websites compliant with W3C standards by not using marquee tags. The problem is that I still want to keep my horizontal scrolling text (yes, I know there is an issue with accessibility standards but I still need the scrolling text).
Anyways, I have found all sorts of ways to use CSS and JavaScript for vertical scrolling text while still being compliant however I have no clue how to do it with horizontal scrolling text. The site I am trying to update is www.gpfbarracudas.org , specifically the scrolling text under the title image. Any help would be greatly appreciated! Josh Similar TutorialsHi all, I have just found this forum and have an issue to solve... I'm creating my online portfolio and as many photographer I have choosen to use an horizontal scrolling. It works fine on all browsers except IE below version 8. Do you know what can be the trick ? The code is the following : There is a main images container in which two type of images are placed (landscape or portrait orientation) Code: #images { background-color: #FFF; overflow: auto; position: absolute; left: 0; right: 0; height : 600px; top: 63px; white-space: nowrap; z-index:1; overflow-y: hidden; } .imagew { display: inline-block; width: 800px; height: 600px; text-align: center; line-height: 600px; } .imageh { display: inline-block; width: 450px; height: 600px; text-align: top; line-height: 600px; } after that the code is : Code: <div id="images"> <div class="imagew"><img alt="" src="offshore/1.jpg"/></div> <div class="imagew"><img alt="" src="offshore/2.jpg"/></div> <div class="imagew"><img alt="" src="offshore/3.jpg"/></div> <div class="imagew"><img alt="" src="offshore/4.jpg"/></div> <div class="imagew"><img alt="" src="offshore/5.jpg"/></div> </div> Hi all, I'm working on a "toolbar" in a site, which users can populate with links and notices as they desire. Since it's possible that they'll put so much into the bar that it wont fit on the screen, I want to make it scroll horizontally - but without scrollbars. I'm hoping to have an area to the left and right of the toolbar that they can mouseover to scroll it in that direction. Here's a pictu I'm not having much luck getting it working, despite trying a few things google turned up... Apparently I can get rid of the scrollbars by having a div with overflow:auto inside one with overflow:hidden... (link) The same site also shows how to only a horizontal scrollbar... (link) I experimented a bit with white-space:nowrap to get the content to stay all on one line, which seems to work in FF (stays on one line inside the horizontally scrolling div) but not IE (stays on one line but stretches the div size)... Any ideas? hey guys im having some problems getting this to work in IE 6 but it works fine in FF. Im really not sure whats wrong any help would be great. Code: <div style="display: block; height:150px; overflow:auto;overflow-x:scroll; overflow-y:scroll; overflow:-moz-scrollbars-horizontal;"> <div style="float:left; white-space: nowrap;"> <img src=\"pic.jpg\" alt=\"gall image\" /> <img src=\"pic.jpg\" alt=\"gall image\" /> <img src=\"pic.jpg\" alt=\"gall image\" /> <img src=\"pic.jpg\" alt=\"gall image\" /> <img src=\"pic.jpg\" alt=\"gall image\" /> </div> </div> Hi all, I'm fairly new at CSS and web development in general, but I've started working on a project which needs an unknown number of divs to be nested inside an external one. What's happening at the moment is that, if the internal divs are too long, they'll wrap around to the next line. What I need to happen is that a horizontal scrollbar will appear when the internal divs go past the end of the page. I've tried putting "overflow: auto;" on every possible component of the HTML but, so far, there has been no effect. A test version of the code is below and I really hope that someone can help me with this. Thanks! CSS: Code: #main { overflow: auto; } .a { float: left; } HTML: Code: <body> <div id="main"> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> <div class="a">supercalifragilisticexpialidocious</div> </div> </body> I have a couple divs using percentage columns. The issue I am having is that when the page is displayed (in IE or FireFox) I am getting the horizontal scrollbar. It scrolls an extra ~15%. I am learning CSS (slowly) so any help would be greatly appreciated. -K html Code: <div id="wrapper"> <div id="content"> <p> text </p> </div> </div> <div id="navigation"> <p>text</p> </div> <div id="extra"> <p>text</p> </div> Code: div#wrapper{float:right;width:100%;margin-right:-33%; display:block;} div#content{ margin-right:33%; border-left:2px solid #FFFFFF; border-left-color:#660000; padding-left:10px; padding-right:10px; } div#navigation{ float:left; width:32.9%; } div#extra{ float:left; clear:left; width:32.9% } p{margin:0 10px 10px} Hi folks, I'm working on a website at the moment and having some issues 'fixing it' for Internet Explorer. The design scrolls horizontally, and using 'position:fixed;' on certain elements keeps them on the page while the rest scrolls - this works fine in Safari / Camino / Firefox etc. but as we know position:fixed; is broken in IE. I tried applying the fix found at http://web.tampabay.rr.com/bmerkey/...tion-fixed.html but this only seems to work for regular vertical scrolling pages - when scrolled horizontally the "fixed" elements still scroll with the page. Is there any way possible to get this to work? I really really want to avoid any of those javascript "jumpy" scripts to reposition the element all the time. Thanks all. does anyone know the code for a scroll text box? plz help Can anyone tell me where I can get some info on CSS? Specifically I am trying to create sort of a news page, which will have a box that contains news articles that slowly scroll upwards until they disppear and then raeppear at the bottom at the bottom of the box again. I know this can be done with CSS and I've kind of accomplished what I want. The problem is that I'm using seperate elements for each article title. Therefore, only one article title scrolls through the box at the time since I can only make one element visible. Mabye, it will make more sense when you see my code. I want to basically be able to have the other news article titles begin to scroll underneath each other, not having to wait for the news article title above it to finish scrolling before the next article enters the box. I hope this makes sense! here is the code: <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript"> function init() { nos = 1; items = 6; posY = 130; scroller(); } function scroller() { if (nos == items + 1) { nos = 1; } elemID = 'elem'.concat(nos); objDOM = document.all[elemID].style; objDOM.visibility = "visible"; posY -= 1; objDOM.top = posY; if (posY <= 50) { objDOM.visibility = "hidden"; posY = 130; nos += 1; } setTimeout ("scroller()",10); } // --> </SCRIPT> <STYLE TYPE="text/css"> <!-- #elem1 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem2 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem3 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem4 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem5 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #elem6 {position:absolute; visibility:hidden; left:35; top:0; z-index:5} #screen {position:absolute; visibility:visible; left: 20px; top:50px; z-index:0} --> </STYLE> </HEAD> <BODY onLoad="init()"> <DIV ID="elem1"><FONT COLOR="#000000"> News & Events- article 1 </FONT></DIV> <DIV ID="elem2"><FONT COLOR="#000000"> News & Events- article 2 </FONT></DIV> <DIV ID="elem3"><FONT COLOR="#000000"> News & Events- article 3 </FONT></DIV> <DIV ID="elem4"><FONT COLOR="#000000"> News & Events- article 4 </FONT></DIV> <DIV ID="elem5"><FONT COLOR="#000000"> News & Events- article 5</FONT></DIV> <DIV ID="elem6"><FONT COLOR="#000000"> News & Events- article 6</FONT></DIV> <DIV ID="screen"> <TABLE WIDTH=350 HEIGHT=120 BORDER=0 BGCOLOR=#808080> <TD></TD></TABLE> </DIV> </BODY> </HTML> Hi, I have a webpage that has a fixed background with a header. I want my content to be able to scroll without overlapping my header. Meaning, the content needs to be masked? Or on a different z-index? Or in a frame? I know these are possible but nothing seems to be working. Please help!!! HTML CODE: Code: <div id="background"> <div id="menucontainer"> <div id="menu"> <ul> <li><a href="about.html">About</a></li> <li><a href="safaris.html">Safaris</a></li> <li><a href="lodging.html">Lodging</a></li> <li><a href="pricing.html">Pricing</a></li> <li><a href="gallery.html">Gallery</a></li> <li><a href="contact.html">Contact</a></li> </ul> </div></div> <div id="content"> <h1><span>About Us</span></h1> <p> Welcome to Trompettersfontein. Our expertise is to create exclusive and unique safaris, professionally assisting you in your most unforgettable hunting experience. Originally a cattle ranch during the 1960's, we are now a prominent name in the gaming and ranching industry. Located in the Elisraas region, Lepahale, in the Limpopo province close to thabazambi and the waterburg area creating a wildlife oasis making it a prime hunting ground of South Africa. Situated on 1000 hectors, with special hunting permission our total hunting area extends over 3000 hectors of typical bushveld area. The terrain makes makes excellent meat hunting and bow hunting grounds. Owned and managed by Marius Moolman, a professional game hunter since 1986. An exceptional tracker with a vast knowledge of the bush and game, he has studied the age-old natural relationship between predator and prey. He has also had the privilege of hunting the Big 5 and is a great host and sense of humour that will leave you with a longing of coming back soon.</p> <p>Our motto 'conservation through sustainable utilisation' is closely followed. Ours is a self sufficient game ranch with solar energy utilisation, rainwater harvesting and sustainable breeding herds. Though we use the resources available, we make sure never to destroy the integrity of the land. Fire is a natural part of the ecosystem, control of runaway fires is vital, but correct burning is essential for the long-term health of the natural environment. Waste-water is cleaned naturally through oxidization dams. The cleaned water runs back into drainage lines, which ultimately feed underground aquifers, thus creating a full natural water cycle. </p> <p>Our motto 'conservation through sustainable utilisation' is closely followed. Ours is a self sufficient game ranch with solar energy utilisation, rainwater harvesting and sustainable breeding herds. Though we use the resources available, we make sure never to destroy the integrity of the land. Fire is a natural part of the ecosystem, control of runaway fires is vital, but correct burning is essential for the long-term health of the natural environment. Waste-water is cleaned naturally through oxidization dams. The cleaned water runs back into drainage lines, which ultimately feed underground aquifers, thus creating a full natural water cycle. </p> <p>Our motto 'conservation through sustainable utilisation' is closely followed. Ours is a self sufficient game ranch with solar energy utilisation, rainwater harvesting and sustainable breeding herds. Though we use the resources available, we make sure never to destroy the integrity of the land. Fire is a natural part of the ecosystem, control of runaway fires is vital, but correct burning is essential for the long-term health of the natural environment. Waste-water is cleaned naturally through oxidization dams. The cleaned water runs back into drainage lines, which ultimately feed underground aquifers, thus creating a full natural water cycle. </p> </div> </div> CSS CODE: Code: body { background:#000000; margin:0px; padding:0px; width:100%; } #background{ background-image: url('Images/background2.jpg'); background-repeat: no-repeat; background-position:top; background-attachment: fixed; margin:0px; padding:0px; width:100%; height:100%; z-index:-10; } #menucontainer { width:650px; margin:auto; padding:150px 0 0 0; } #menu{ width:650px; margin:0px; position:fixed; z-index:5; } a:link { color: #000000; text-decoration: none; } a:hover { color: #FF6600; text-decoration: none; } a:visited, a:active { color: #FF6600; text-decoration: none; } #menu ul{ font-family:Arial, Helvetica, sans-serif; font-size: 15px; color: #000000; text-decoration: none; list-style-type:none; margin:0px; text-transform: uppercase; font-weight: bold; } #menu ul li{ display:inline; margin: 0px; padding:3px 14px 3px 14px; } #content{ width:500px; margin:auto; padding:0 0 400px 0; position:relative; top:30px; font-family:Arial, Helvetica, sans-serif; font-size: 12px; color: #000000; text-align:justify; z-index:1; } h1 { background: url('Images/about.png') no-repeat top left; width:168px; height:38px; } h1 span { visibility:hidden; } p { line-height: 18pt; } As I am pretty new to CSS (about 3 months now) please be patient if I dont understand very advanced coding. Thanks for your time and effort. Any help is much appreciated. In the HTML below I use divs contentleft, contentcenter and contentright. Because the text under the Header Contentright is so long I would like to make a scrollbar for the text of contentrigth but withoud the Header contentrigth, so that you alwaus see the header when scrolling the text. Is this possible with these content-codes? This is the HTML I have so far: Code: <head> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> <meta name="generator" content="Adobe GoLive 4"> <title>glish.com : CSS layout techniques : static width and centered</title> <style type="text/css"><!-- #contentcenter { background-color: #eee; float: left; padding: 0px; width: 300px } #contentheader { background-color: #fff } #contentheader h1 { font-size: 14px; margin: 0px; padding: 16px } #contentleft { background-color: #fff; float: left; padding: 0px; width: 175px } #contentright { background-color: #fff; float: left; padding: 0px; width: 175px } #contentright p { font-size: 14px } #toptext { text-align: left; margin-top: 10px; margin-right: auto; margin-left: auto; padding: 0px; width: 650px } body { text-align: center } h1 { font-size: 14px; margin: 0px 10px 10px; padding-top: 10px } p { margin: 0px 10px 10px }--> </style> </head> <body> <div id="toptext"> <div id="contentheader"> <h1><a href="home.asp">Top Text</a>, page with three columns: left, centered, right.</h1> </div> <div id="contentleft"> <h1>Header Contentleft</h1> <p class="greek">This is the left column</p> </div> <div id="contentcenter"> <h1>Header Contentcenter</h1> <p>This is the center column</p> </div> <div id="contentright"> <h1>Header Contentright</h1> <p>This is the right column. Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla. Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla. Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla blaBla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla. Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla Bla bla bla bla bla</p> </div> <p><br clear="all"> <!-- without this little <br /> NS6 and IE5PC do not stretch the toptext div down to encopass the content DIVs --> </div> </body> </html> I've got some text setup in a <div> of mine, and the lines of text are so long that they scroll off the side of the screen. I want these lines to wrap to a new line so they don't scroll off the screen. How do you make text in a <div> not be able to be more wide than like, x% of the screen? To view my problem go to my url he my site Hi All, I am experementing with a fixed watermark image/background on my webpage.The code worked fine to prevent the image from tiling however when I scroll the whole lot goes as well,the table of rolovers and the header image. I need a code to keep the table of javascript and the image fixed while only the text scrolls. Also as you will see the bg image takes up the whole page which results in the text scrolling over the entire height of the page.Is there any code I can apply to make a cut off point for the text,for appearance sake lets say the top bar of the image .Here is the url of the page I am working on. Thanks URL [A view of what I want the final product I made in photoshop is attached.] When it comes to the technical aspect of design I BS my way through most of it or pick it up as I go along. On top of this, I'm too anal to use anything but Notepad to edit my code, but that's not the problem. This is: The image at the bottom of the page is what I'd like the damn page to look like without the use of Flash (I could do that, but I want to make a seperate site design that uses flash and keep this to HTML, CSS and maybe Javascript). So, I found this: URL and I think it's what I want, but, my first thought was that it was an arhived post. It actually appears to be an unanswered post. I tried it out, and sure enough it doesn't work. Well, I was hoping it would, because I'm more geared towards Graphic Design and no coding. I tend to design em first and fill in the blanks later. Well, this time, my code isn't the only thing that's blank and I'm just this page and another very similer one away from finishing the site, so I need help. Here's how I planned to put the thing together: It's an HTML table centered in the middle of the page. I was planning on planting the CSS in the gaping hole left by removing a section of table, and praying it fit snugly. Am I going about this wrong? And if I'm not and that link is the solution to my problems, how do I implement it into my code? I tried a test version of it, and couldn't get it to work, but I'll tell you now, I only have a theoretical graps of CSS and haven't dove into it as of yet...thus I know nothing really. And on top of this, I want to make those two left side text pieces link to anchors in the scrolling text. And those things on the right side are customized scoll bars. The latter is not nesscary (I know that's java script. I had it on a site I did a while ago, but the site is lost and I didn't code that section), but it would be optimum. So that's it, and, well, if it works, it will look pretty. Thanks for your help before hand, if this is too rambling, please feel free to tell me to better describe it. I'm in a bit of a rush, and as soon as I hit "Submit" I'm running out the door. ------->Jeff Compton I have a script that shows the latest lines from my chat. sometimes people will post a super long url or another super long thing without periods ie testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something-testing-something how can I make css break that up so the browser window won't scroll vertically? Hello, I'm trying to create an list menu like the one in attached image and I have 2 problems. 1. In IE 6,IE 7 the list is ordered verticaly and not horizontaly (in Opera and FF it is ok) 2. I need to align the text on the bottom of the list like inattached image. Here is what I manage to do till now : http://www.sibiul.net/test/list-align.php Anyone knows what I must do ? 10x Hey, I'm having a problem changing the background of a text input field to white. The problem seems to go away when I remove the javascript...I know next to nothing about javascript. Any ideas? Code: <label for="email"> <input size=30 id="email" name="iemailaddress" value="Enter your email address here" onFocus="functionEmpty(this.form)" onBlur="emptyFill(this.form)" onKeypress="subEnable(this.form)"> </label> Code: input {background-color:white;} Hi guys, I've this div with overflow:auto. This div is populated using xmlhttprequest (it's an IM chat) so it will be getting full to the point where there's an overflow and the scrollbar shows up. What I would like to do is, whenever a new content line was added to the div (I'm using DOM to do so), the scroll (if overflow has happened) would go all the way down in a way where the last line of visible text in the div would always be the last line inserted. I'm somewhat newbie at this stuff so, any help in the right direction would be great! Thx Hugo Hey guys!! I got a quick question. I have a CSS layout page with 2 scrollbars. The first one for a news section and the second for a product. I have a lot of content for both sections, The scrollbars work fine, but on the main IE the scrollbars keep adjusting to the content that I have. if i have less content then its small..... I want to have no scrolling on my main window. Good morning, I have a problem with a layer(div) that I am putting over my page everytime the user clicks a button and a transaction is send to the host. My problem is that if there is an scroll and the user scroll, the message scrolls up and dissapears. I need to fix it to the center of the screen. I have tried with % instead of absolute px. Can anyone help me, please?. I am close to my deadline, so any help would be really apreciated. I am attaching my code: window.onbeforeunload=new Function("Procesando.style.visibility='visible';"); window.onblur=new Function("Procesando.style.visibility='hidden';"); //window.onfocus=new Function("Procesando.style.visibility='hidden';"); document.write('<div style="position:absolute; top:160; left:313; visibility:hidden; overflow:hidden; background-color:#CCCCCC; clip:rect(12,177,50,3); " id="Procesando">\n'+ '<select size=4 name="cbEspera" class="TextoTablaIzq" style="background-color:#CCB8E0; font-Weight:bold;">\n'+ '<option> </option>\n'+ '<option> Procesando su petici'+unescape("%F3")+'n. </option>\n'+ '<option> Espere por favor... </option>\n'+ '<option> </option>\n'+ '</select></div>\n'); |