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.

Keeping divs under control

Featured Replies

Hello everyone!

 

I'm having some trouble with my guitar repairshop website, which is being done by myself. I'm not a pro, so please bear with me - the CSS mighty newbie - for a little while please.

 

There are some floating divs going on containing the logo, navbar, content area, etc. What I would like to do is to center the site horizontally (which I already managed to do) and vertically, in most browsers.

 

As you can see, my website is centered horizontally but not vertically.... BUT, the background's centered vertically in Google Chrome and IE7. Also, the floating divs are kind of messed up.

 

In Opera/Firefox (fine but not vertically centered):

 

acbf491c4f.jpg

 

In Chrome/IE (the background is vertically centered but I get D.D.S.: dodgy divs syndrome):

 

0cfafd4560.jpg

 

 

As I find myself a bit lost, I thought I'd bug you about this subject.

 

Any help is extremely welcome, so thank you in advance for reading.

 

Regards

Hi,

 

see Hicks' technique for vertically and horizontally centering a container <div>

 

 

Sameer

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.