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.

float tags - not working =/

Featured Replies

So, My Float tags are being pain in the asses and are not working right. Help me please?

 

My HTML

<html>
<head>
<link rel="stylesheet" type="text/css" href="design.css">
</head>
<body>
<!-- Begin Navigation Menu -->
<div id="nav_bar_main_un">
<div id="nav_bar_main_deux">

</div>
</div>
<!-- Begin Wrapper_Main -->
<div id="wrapper_main">
<div id="user_bar> user_bar </div>
<div id="main_container> main_container </div>
</div>
</body>
</html>

 

My CSS

body {
width:100%;
height:100%;
color:#76818d;
background:#b5cbb0;
margin:0 auto;
padding:0;
}
/* Begin Navigation Menu */
#nav_bar_main_un{
width:100%;
height:33px;
color:#76818d;
background:#93b7aa;
margin:0 auto;
padding:0;
border-bottom:1px solid #717e90;
}
#nav_bar_main_deux{
width:100%;
height:32px;
color:#76818d;
background:#93b7aa;
margin:0 auto;
padding:0;
border-bottom:1px solid rgba(255,255,255,0.45);
}

/* Finish Navigation Menu */
/* Start wrapper Menu */
#wrapper_main{
width:800px;
height:100%;
margin:0 auto;
border-left:1px solid rgba(255,255,255,0.45);
border-right:1px solid rgba(255,255,255,0.45);
padding-top:5px;
}
/* Finish Wrapper Menu */
/* Start notifications Menu */
#user_bar {
width:100px;
height:320px;
background:#ffffff;
}
#main_container {
width:790px;
height:320px;
background:#ffffff;
float:right;
}

 

For some reason, they're overlapping each other.

Edited by RickyCook

Your wrappermain div is 800px wide,your user_bar is 100px wide and your main_container is 790px wide. 100+790px=890px.

  • Author

Your wrappermain div is 800px wide,your user_bar is 100px wide and your main_container is 790px wide. 100+790px=890px.

 

I just fixed that, but they're still not working. =/

 

I've found the problem. I've missed 2 quoteation marks as shown below.

 

<html>
<head>
<link rel="stylesheet" type="text/css" href="design.css">
</head>
<body>
<!-- Begin Navigation Menu -->
<div id="nav_bar_main_un">
<div id="nav_bar_main_deux">
</div>
</div>
<!-- Begin Wrapper_Main -->
<div id="wrapper_main">
<div id="user_bar (" was missing here)> user_bar </div>
<div id="main_container(" was missing here)> main_container </div>
</div>
</body>
</html>

Edited by RickyCook

I just fixed that, but they're still not working. =/

have you accounted for any paddings or margins within the Divs? you need to factor these in as well.

Also, its a bit (a lot) of a hack, but as you're using a fixed width it might work. try adding this to your

#main_container div

margin-left:101px;

Edited by kree8or

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.