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.

HTML and CSS Code Help Needed

Featured Replies

Hi, and thank you for checking out my thread.

 

I want to have just a plain #FFF Header with a width of 965px and a height of 155px. Empty Header I guess is what I should say. And right under the Header I want a simple Black Nav Bar that width is 100% and height is 39px.

 

Question is, would I use margin: 0 auto to center the Header and glue it to the top of the HTML document? And also, because I want the Nav Bar to span the width of ones monitor I would not be using a Wrapper, am I correct? And how would I position the Nav Bar to glue to bottom of the Header? The NAV BAR is not inside the header, it's right below it.

Thank you

margin: 0 auto, will take into consideration of the space 'automatically' left on the right/left side of the div and divide it equally to center your div.

 

Nav bar to bottom of header?

 

Just use divs.. <div id='header'>content bla bla</div><div id='nav'></div> The nav div must come after the header.

 

Generally it may not display exactly under the header div due to browser styles. so it's always a good idea to reset your browser styles and style it how you wish. e.g div { margin: 0; padding: 0;

Put your header, main content and footer DIVs into a DIV with an id "wrapper"

 

Then put a margin: 0 auto; on the wrapper div.

 

As long as the header div comes before the rest of the content it will be at the top.

Hi MartyBoi,

 

You should try using clear:both.It would simply position your nav below the header.

 

Thanking You,

Futureistic Team.

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.