Skip to main content
nilleg57851248
Inspiring
Jan 3, 2020 6:20 AM UTC
Question

Float problems

I want the images to float horizontally, but they shows up vertically in Dreamweaver.
What do I do wrong?

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Nancy OShea
Community Expert
Community Expert
Jan 3, 2020 10:19 PM UTC

We don't use floats much anymore.  It's not wrong to use floats but it's not modern.  With Flexbox you have more control over how things line up.

https://www.w3schools.com/css/css3_flexbox.asp

 

Translate
Nancy O'Shea— Product User & Community Expert
Jon Fritz
Community Expert
Community Expert
Jan 3, 2020 1:31 PM UTC

Try adding a . in front of the container class on line 8.

Class selectors start with a .
    Example: .container {}
ID selectors start with a #
    Example: #navigation {}
HTML element selectors are written without either
    Example: img {}

Translate
Legend
Jan 3, 2020 3:57 PM UTC

Good spot - I didn't see that missing period before the css container selector.

Translate
Legend
Jan 3, 2020 10:02 AM UTC

DW is/was not great at showing the actual layout correctly in Design View, although it may have improved in recent years, since I last used it.

Do the images show up horizontally when you view in the browser? I can't see anything wrong with your code.

Translate