CSS CSS Layout Basics CSS Layout Project Creating and Styling the Layout Containers

Amandeep Pasricha
Amandeep Pasricha
14,931 Points

Having trouble separating float elements properly in footer for mobile-view?

Hello, I've been referencing these videos to work on project 2. In my footer, I feel like I'm doing something wrong. In mobile view, the two floated elements appear way too close to each other. Should I just decrease the font-size or is there something else I can do?

https://github.com/apasric4/FEWD-project-2

1 Answer

Jamie Reardon
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Hi

Without looking at your css, a quick glance of your html shows that you have a ul within a ul element. This sounds like the issue for your floats to me. Instead a better approach if you want to have another list inside a list, you need to have it within a li like so:

<ul>
  <li></li>
  <li>
    <ul>
      <li></li>
    </ul>
  <li></li>
</ul>

Your elements are probably appearing "too close" because they are not properly separated by their content. Meaning, they are all nested inside one ul. Separate your student name link from the footer nav and float them left and right.

Andrew Rusli
Andrew Rusli
6,577 Points

you should not have any floated elements in the mobile view. you start with the static mobile view, then use floats in the larger media queries.