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.

Help - Floats and Fixed Position

Featured Replies

how can i create a #header div tag

inside the #header div tag i want an IMG floating to the left and content floating to the right

 

then i want this entire #header div tag to be a fixed position. so the header is fixed while the viewer is scrolling down the website.

 

then i need to restore normal document flow so that the next div tag #mainContent is good to go.

 

ive tried a few things but ive had no luck

 

i have a div #header, inside this #header i have an IMG. this IMG is not in a div tag, i float the image left.

then i have a paragraph which is also in the #header, but after the IMG. i float the paragraph to the right, like so

#header p

float: right

 

how i have a #header div tag

inside this div tag is an IMG floating left, and paragraph floating right, i text-align the pargraph content to the right.

 

the header seems to be decent, img all the way to the left, and paragraph content all the way to the right..

 

now i want to FIX position this entire div #header. i want the paragraph content and IMG to stay fixed in the positions they are in right now.

 

i went to my CSS for the div #header and position: fixed

 

it messed the layout up.

 

much thanks to any help i can get on this

 

-James

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.