Hi Folks, Another new bod asking questions. I am trying to insert a free script from Dynamic Drive () for a flexible slideshow. I am using Dreamweaver CS4 and the code goes in ok and works well in Live view. But - the slideshow is on the left of the cell in which it is inserted. The code says that the 'container' should be centre. I have looked at my own source code and everything seems set to centre. Has any one got any ideas. Hope someone can help. Thanks in anticipation. Jinxy13

Dani AI

Generated

A few focused checks that fix this in most cases, plus a quick fallback you can try before swapping plugins (as suggested).

Centering depends on how the slideshow container is rendered (block vs inline, floated, or absolutely positioned). Use the browser inspector to look at the computed styles and find any float, position, or width rules that come from the slideshow CSS or theme.

Common fixes:

/* block-level with explicit width */
.slideshow-container {
  width: 600px; /* set to the slideshow width */
  margin: 0 auto;
  float: none;
  display: block;
}
/* inside a table cell: center via parent text-align + inline-block */
td { text-align: center; }
.slideshow-container { display: inline-block; float: none; }
/* if the plugin absolutely positions the box and width is not fixed */
.slideshow-wrap { position: relative; }
.slideshow-container { position: absolute; left: 50%; transform: translateX(-50%); }

Notes: avoid !important unless you must override inline/plugin rules. Make sure your DOCTYPE puts the page in standards mode; quirks mode can break margin: 0 auto. Test in actual browsers (not only Dreamweaver Live view). If computed styles show a float:left or position:absolute coming from the plugin, override or wrap the slideshow as shown. For CSS behavior references see MDN on margin and on text-align (both pages respond with standard docs).

Recommended Answers

All 4 Replies

Can you upload the page so we can see the code? It is hard to debug something you cannot see!

The site may be seen at Homepage.

Thanks
Hope you have some ideas.
Jinxy13

Thanks Moon Traveller
That is very, very helpful. Will do.
Regards
Jinxy13

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.