• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Float problems

Engaged ,
Jan 02, 2020 Jan 02, 2020

Copy link to clipboard

Copied

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

This is how it show upThis is how it show upDreamweaverDreamweaverThis is what I wantThis is what I want

TOPICS
How to , Performance

Views

522

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 03, 2020 Jan 03, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2020 Jan 03, 2020

Copy link to clipboard

Copied

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 {}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 03, 2020 Jan 03, 2020

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 03, 2020 Jan 03, 2020

Copy link to clipboard

Copied

LATEST

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

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines