Hi Folks, I am trying to insert a free script from [B]Dynamic Drive[/B]  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. 
Thanks in anticipation.  
It can be viewed at 
Jinxy13

Dani AI

Generated

As noted, the visual problem was resolved by wrapping the slideshow in a centered container. That is a valid quick fix, but it is worth knowing cleaner, more robust CSS approaches and a few troubleshooting checks so the layout behaves consistently across browsers and when the slideshow is responsive.

Common, reliable centering options

  • Block with auto margins (best when the slideshow has an intrinsic or max width):

    .slideshow {
      max-width: 800px; /* or specific px value */
      margin: 0 auto;
      display: block;
    }
  • Inline-block centered by parent text alignment (works for variable widths):

    .slideshow-wrapper { text-align: center; }
    .slideshow { display: inline-block; }
  • Flexbox on the parent (modern, works for any child size):

    .parent { display: flex; justify-content: center; }

Troubleshooting checklist

  • Use the browser Inspector to check computed styles for float, display, margin, and the parentstext-align. Afloat:left` or a very specific selector in the slideshow script will override simple rules.
  • If the script injects inline styles, target a higher-specificity selector or modify the script output. Use !important only as last resort.
  • Test in a real browser (Dreamweaver Live view can differ).
  • Prefer CSS wrappers or flexbox over table-based layout for accessibility and maintainability.

For a compact reference on centering techniques and flexbox usage, see the centering guide at CSS-Tricks and the MDN flexbox docs: Centering in CSS (complete guide) and .

Recommended Answers

All 3 Replies

Member Avatar for Member #334542

Its already looks center!! I did not get you

Thanks for your interest. I had managed to sort this by nesting the code inside a single row/column table aligned to centre. I thought that I had marked this as 'Resolved'.
Thanks again
Jinxy13

Member Avatar for Member #334542

COOL! Thanks!

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.