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.

CSS layering

Featured Replies

Is it possible to make a div tag "float" in CSS so it will not effect the position of other items, such as not resizing the cell it is placed in and instead overlapping into the next cell?

 

Thanks in advance,

 

Chris

Floating keeps it in the page flow, meaning it can interact with other elements.

 

What you want is the position attribute.

 

Position:absolute - It's in a fixed position relative to it's parent container

Position:Fixed - It's fixed relative to the view port (and thus when you scrolls, it stays in the same spot.

Position:Relative - It's fixed relative to the position it would have in the flow of the page.

 

P.S you should avoid putting divs in tables, theirs not really any need to.

  • Author

My problem is that my website is centred so different screen resolutions cause the absolute position to require a different number, is there a work around for this as relative causes the cell to "grow"?

Wrap the whole thing in a container that's relatively positioned, then when you use absolutely positioned, it won't be using the view port, but the parent container.

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.