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.

sensuous-love

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    sensuous-love reacted to rbrtsmith in float or display inline?   
    He has used it as a clearfix solution - stopping the parent container collapsing when it has floated children, floated elements are taken out of the normal document flow causing the parent to collapse.
     
    I prefer to use this clearfix solution because at times you do want content to overflow - such as a drop down have on hover or similar. Give the ul a class of clearfix
    then
    .clearfix:before { display: table; clear: both; content: " "; }
  2. Like
    sensuous-love reacted to rbrtsmith in float or display inline?   
    you can use either, I personally use floats, reason being is that display-inline block adds a tiny bit of margin to the element (The size of the margin being related to the font size either specified to the element or inherited from a parent / ancestor).
  3. Like
    sensuous-love reacted to Wickham in float or display inline?   
    You could use display: inline-block for the li tag, but float is better because it's better for positioning (like margins). Use this code to see the difference:
     
     
    <!DOCTYPE html> <html> <meta charset="UTF-8" /> <title>test</title> <style type="text/css"> ul { list-style-type: none; overflow: hidden; background: pink; } ul li { display: inline-block; background: lime; } ul li a { display: block; padding: 10px; width:80px; background: #aaa; } ul li a:hover { background: skyblue; } ul.b { list-style-type: none; overflow: hidden; width:200px; background: pink; } ul.b li { float:left; width: 100px; background: lime; } ul.b li a { display: block; padding: 10px; width:80px; background: #aaa; } ul.b li a:hover { background: skyblue; } </style> </head> <body> <ul> <li><a href="http://www.facebook.com">Facebook</a></li> <li><a href="httpt://www.google.com">Google</a></li> </ul> <ul class="b"> <li><a href="http://www.facebook.com">Facebook</a></li> <li><a href="httpt://www.google.com">Google</a></li> </ul> </body> </html>
  4. Like
    sensuous-love reacted to sash_oo7 in float or display inline?   
    I would say float is better
     
    check the following example
     
    ul { list-style-type: none; overflow: hidden; width:200px; } ul li { float:left; width: 100px; } ul li a { display: block; padding: 10px; width:80px; } ul li a:hover { background: black; } <ul> <li><a href="http://www.facebook.com">Facebook</a></li> <li><a href="httpt://www.google.com">Google</a></li> </ul> here u can see when u use display:inline u cannot set properties like width, padding (top and bottom), margin etc... which is an handicap for layout purposes.
  5. Like
    sensuous-love reacted to sash_oo7 in confused about wrapper div   
    use a wrapper class instead of id .. tht way u can use it repeatedly
     
    like this
    and make footer and header width 100%
    <div id="header"> <div class="wrapper"> header content... </div><!--wrapper--> </div> <div class="wrapper"> <div id="banner"> banner content... </div> <div id="content"> main content... </div> </div><!--wrapper--> <div id="footer"> <div class="wrapper"> footer content... </div><!--wrapper--> </div> .wrapper { width:960px; margin:0 auto; } #header { width:100%; background:#06C; height:200px; } #banner { background:#0C9; } #content { background:#666666; } #footer { width:100%; height:50px; background:#993333; }
  6. Like
    sensuous-love reacted to webdeveloper93 in confused about wrapper div   
    U could put both the header and footer outside the wrapper

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.