• Resolved sc_

    (@sc_)


    Hello.

    First off, let me show you the WordPress theme I’ve been messing around with. https://rabidfandom.com/

    Is there a way to “defloat” a floating element. My sidebar is floated to the right. If my window is maximized, that looks great. If my window isn’t maximized, the sidebar goes down until it can fit into the space. Of course I understand that a floated element will do this. Isn’t there some way to make it stay put though?

Viewing 3 replies - 1 through 3 (of 3 total)
  • It’s doing that because the other floated element, the content div, is a fixed width of 600px. Try changing that to a percentage, like 75%.

    Content is 600px, sidebar is 200px. Toss in the margins and paddings and sure anything less than full-screen will throw it off.

    If you took the float:right off the sidebar, it would stay under the content.

    Thread Starter sc_

    (@sc_)

    Wow… That actually worked. Thank you. ??

    You are very welcome. I’ve encountered the same issue a LOT. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Defloating A Floating Element?’ is closed to new replies.