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 Absolute Positioning problems with DIVs

Featured Replies

So here's my problem:

 

I have tried to script a complex webpage layout, and I apparently ended up overusing <DIV> tags and absolutely positioned elements, because after a certain point (I forget exactly how many... it was around 14-19), my browser would simply ignore my commands to absolutely position elements. (NOTE: I am using Firefox 2 and Firefox 3, but I need my website to look the same regardless of browser.)

 

My questions:

 

1. Is there a maximum to the number of <DIV> tags one can use?

2. Is there a maximum amount of absolutely positioned elements one can use, and if so, how many?

3. Is there any way to get around either of these problems with a different type of scripting?

 

I realize that using absolutely positioned elements for everything is bad scripting. However, floats simply do not work for what I'm trying to make... I've tried. :bangb:

1. No, although too many creates bloated and slow code

2. No, but your can't absolutely position everything

3. Without a link or a screenshot can't see what you're trying to achieve, so can't therefore suggest another way.

Is it really necessary to have so many absolutely positioned divs?

 

I overcomplicate sometimes - usually the answer is a lot more simple.

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.