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.

Preemo

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    Preemo reacted to Samus in Need help centering 2 divs   
    CSS

    div.wrapper { margin: auto; }
  2. Like
    Preemo reacted to Mikec1uk in Need help centering 2 divs   
    Adding
     

    margin:0 auto;
     
    to the css of your wrapper div should do the trick.
  3. Like
    Preemo reacted to mteam in How do I code this layout?   
    You need to add a width for margin auto to work
     
    add a height to #header-tile
     

    #wrapper { margin: 0 auto; width:960px; } #header-tile { background: url(images/header_bar.png) repeat-x; height:50px; }
  4. Like
    Preemo reacted to Alluziion in How do I code this layout?   
    Ok say you have your basic layout you simply add the wrapper and empty divs as shown.
     

    <html> <head> Head content here </head> <body> <div id="header-tile"></div><!-- SPREADS ACROSS --> <div id="wrapper"> <!-- start wrapper --><!-- ALL CENTERED --> <div id="header"> header content goes here such as your navigation. </div> <div id="main-content"> all your main content and other DIVs go here... </div> <div id="footer"> footer content here such as copyright </div> </div> <!-- end wrapper --><!-- ALL CENTERED --> <div id="footer-tile"></div><!-- SPREADS ACROSS --> </body> </html>
     
    So when you center your #wrapper along with all your content using margin: 0 auto and a set width it won't effect the #footer-tile or #header-tile div's which means you can set them to width: 100% and give them a background image (repeat-x) and it will spread across the screen as necessary.
     
    There may be an easier way but I have only made 1 website which is near completion and this method worked so haven't needed to try any alternatives yet.
     
    If your still not too sure just make a new index.html and try it.
  5. Like
    Preemo reacted to Alluziion in How do I code this layout?   
    Their 2 CSS pages... (third is irrelevant)
     

    http://www.bodhost.co.uk/css/style.css http://www.bodhost.co.uk/SpryAssets/SpryMenuBarHorizontal.css
    To get the effect your after is simple.
     
    You need to make a Wrapper DIV which holds the content of the Header, Body and Footer and apply margin: 0 auto; to it.
     
    To get the Footer and Header to spread all the way across make 2 empty DIVs for example (one outside each end of the wrapper div) and put your header and footer graphic in the style for it. for example...
     
    HTML

    <div id="header-tile"></div> <div id="wrapper"> Content here..... </div> <div id="footer-tile"></div>
     
    CSS

    #wrapper { margin: 0 auto; } #header-tile { background: url(path/to/your/header/graphic.gif) repeat-x; } #footer-tile { background: url(path/to/your/footer/graphic.gif) repeat-x; }
     
    usually try not spoon-feed this much but I remember when I first started off it was something I had trouble with.
     
    There may be a better solution than using empty DIVs but never bothered to try anything else as of yet.
  6. Like
    Preemo reacted to zed in Creating a header the same width as the site   
    get your pen/pencil out and then draw around all of it to create a 'wrapper' div.
  7. Like
    Preemo got a reaction from Jo 90 in New-Look WDF   
    I love it! Brilliant design!
  8. Like
    Preemo reacted to andy9l in Having graphics as <div> corners   
    HTML:

    <div class="content-wrapper"> <div class="content-top"><!-- Rounded Top --></div> <div class="content-title"><h2>Title Here</h2></div> <div class="content-body">Body of the content here</div> <div class="content-bottom"><!-- Rounded Bottom --></div> </div><!-- End Content Piece -->
     
    CSS:

    .content-wrapper {width:500px} .content-top {height:15px;background:url('link/to/rounded/corner/top/image.gif') no-repeat top;} .content-bottom {height:15px;background:url('link/to/rounded/corner/bottom/image.gif') no-repeat bottom;}
  9. Like
    Preemo reacted to Bomb in Fixed website width   
    Change the 280% width of your header-right div to 440px.
     
    Hope this helps.
  10. Like
    Preemo reacted to andy9l in Fixed website width   
    CSS:

    * {text-align:center;margin:0;padding:0;} .container {width:940px;margin:0 auto;}
     
    HTML:

    <html> <head></head> <body> <div class="container"> All of your website here... </div> </body> </html>
  11. Like
    Preemo reacted to TylerCollins in Easier way for using the same coding   
    Nope, just refer to it only in the header file the same way you normally do.
  12. Like
    Preemo reacted to andy9l in Easier way for using the same coding   
    PHP includes.
     
    inc.header.php

    <div id="header"> <div id="header-content"> <div id="header-left" align="center"> <a href="index.php" ><img src="images/logo.png" border="0"></a> </div> <div id="header-right" align="center"> <br> <a href="http://www.facebook.com/pages/Laser-Web-Design/174877969215907" target="_blank"><img src="images/facebook.png"></a> <a href="http://twitter.com/#!/laserwebdesign" target="_blank"><img src="images/twitter.png"></a> </div> </div> </div>
     
    inc.footer.php

    <div id="footer"> ... etc. </div>
     
    Each page:

    <?php include('inc.header.php'); ?> <div id="page-content"> Your page here </div> <?php include('inc.footer.php'); ?>
  13. Like
    Preemo reacted to pat24 in <div> on top of each other   
    Just add margin-left:40px; to your header left div in the css
     
    40px is approx
  14. Like
    Preemo reacted to pat24 in <div> on top of each other   
    add margin:0 auto; to your #container in the css
  15. Like
    Preemo reacted to Wickham in Having different content boxes   
    You code a container and then code four divs inside with float: left; width: ??px;
    Make sure that the total widths of 4 divs plus their side margins, side padding and side borders total the width of the container.
     
    CSS

    #container { width: 1000px; overflow: hidden; } #div1, #div2, #div3, #div4 {float: left; width: 240px; padding: 5px; }/*240 + 2*5 = 250 x 4 = 1000*/

    <div id="container"> <div id="div1">........</div> <div id="div2">........</div> <div id="div3">........</div> <div id="div4">........</div> </div>
  16. Like
    Preemo reacted to Wickham in Having different content boxes   
    You haven't got a proper stylesheet, it's got html markup for 404 File Not Found instead of the CSS and your html file must have a doctype at the top before the <html> tag from here
    http://www.w3.org/QA/2002/04/valid-dtd-list.html
  17. Like
    Preemo reacted to mteam in Having different content boxes   
    add
    margin:0 auto; to #container in the css

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.