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.

Easier way for using the same coding

Featured Replies

Okay, if I want the same coding on EVERY page (for example, the header) how would I do this instead of keeping the same load of code?

 

Thanks,

Ryan

What code do you mean, mate? HTML, JavaScript, CSS?

  • Author

Just HTML.

 

Like for example...

<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>

I'd want that to be on every single page - is there an easier way to refer to this code?

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'); ?>

  • Author

Thank you very much!

 

One quick question, will I have to refer to the CSS stylesheet in the php include files?

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.