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 bg

Featured Replies

I cant work out whats happening here

 

Theres supposed to a bg color behind the text I loose it went I float my text ??

 

tia Jack

 

<div id="content2top"><!--roundedcornertop--></div>

<div id="content2"><!--this one has the bg colour-->

<div class="leftsc"><!--left text-->
</div>

<div class="rightsc"><!--right text-->
</div>

</div>
<div id="content2bottom"><!--roundedcornerbottom--></div>

Add this style:-

.clear { clear: both; width: 100%; height: 0; visibility: hidden; }

 

and add the clear div into the markup before the closing tag of the #content2 container:-

...........be.</p>
</div>

<div class="clear">& nbsp;</div><!--added clear div (no space between & and nbsp;-->

</div>
<div id="content2bottom"></div>

</div><!--end middle-->

 

The floated divs have no height, so the #content2 container doesn't know where to add the background. Adding an unfloated invisible div with no height after the floated divs makes the #content2 take the background down to it.

 

Edit: your #content2bottom div which has no content should do the same thing if you move it above the </div> tag into the #content2 div.

  • Author

thanks Wickham much appreciated

 

also that reminded me to put   into the 2 empty divs

 

I'm getting there slowly lol

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.