Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Floating Containers

Featured Replies

Hello Ive had trouble with this for a while now any help would be appreciated.

 

If I have all of the content within a container floating left, my container doesn't wrap around the content in live view on dreamweaver, so I have floated the container too and it wraps but voids my auto margin and doesn't center anymore. I think it might have something to do with the positioning of the content within the container but I still havent got my head around that so... can anyone help please?

 

Thanks

  • Author

Thanks everyone Iv tried to work through it with the given advice but I still have the problem.

 

I have cleared my floats and the container still wont wrap I have got a few books from the library and Ive been reading them today but still got no further.

 

The problem only occurs when the container doesn't have a fixed height, it is set to auto. and the position is relative.

well, the W3C standards says that any container with floated element should have with and height defined, however due to the dynamic content this is not possible to figure out in all designs. However there's a CSS technique that allows you to do that, try to add this CSS selector to your container.

 

myContayner:after {content: " "; display: block; clear: both; height: 0px; visibility: hidden;}

 

it simply adds an element to your code an clear the floats it may content so the container will warp the floated elements as desired.

add the following to the container css, it will then wrap the border / background around the whole content within the div.

 

overflow:auto;

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.