View Full Version : problem with text scroller

08-28-2008, 05:33 PM
I am trying to center a text scroller (scroller at http://www.dynamicdrive.com/dynamicindex2/crosstick.htm) on my webpage and it causes the content of the scroller to go out of frame. Does the scroller have to be left justified?

09-03-2008, 12:50 AM
Well, did you try to left justify the scroller? If you hadn't, it may work. Just try it, and tell me more.


09-03-2008, 06:12 AM
You should be able to center a scroller by giving its outermost DIV a CSS "margin" property, for example:

width: 200px;
height: 100px;
border: 1px solid black;
padding: 5px;
background-color: lightyellow;
margin: 0 auto;

Note that in order for this to work properly in IE though, make sure your page contains a valid doctype at the very top, such as:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">