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.

craftygeek

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    craftygeek got a reaction from xsh00tax in PSD web template help   
    I hardly use slices in photoshop these days as I find it too limiting. I tend to have guides setup marking out key areas of the page, then select what I need, paste into a new document & save for web from there....then I code the css manually.
     
    With more complicated layouts, its not possible to build the page correctly using slices, some of the elements can't be cut out on their own....hence my approach.
     
    Its also good practise to use CSS sprites as well....you can't do this by just slicing up the design in photoshop.
     
    oh & don't use tables...use CSS, it makes more sense
  2. Like
    craftygeek got a reaction from Anton2k in HTML Read From File   
    You're using php, so yes its very easy to do.
     
    save the list of links in a php file & put this in the main file:
     

    <?php include('file_path/my_links.php'); ?>
     
    I tend to put files like this in a folder called 'includes'.
  3. Like
    craftygeek got a reaction from MyLilPrincessParty in I don't even know how to title this!   
    Righty ho....this is a Javascript job.
     
    Put this in the html head on the page:

    <script type="text/javascript"> var oldID = 'p1_text'; // sets default visible package text function makeVis(newID) { if(oldID != newID){ document.getElementById(oldID).style.visibility = "hidden"; document.getElementById(oldID).style.height = "0px"; document.getElementById(newID).style.visibility = "visible"; document.getElementById(newID).style.height = "auto"; oldID = newID; } } </script>
     
    Add this to your CSS:

    .hide { visibility:hidden; height:0px; }
     
    And heres some guide html to get it working:

    <p> <a href="#" onclick="makeVis('p1_text')">Link 1</a> <a href="#" onclick="makeVis('p2_text')">Link 2</a> <a href="#" onclick="makeVis('p3_text')">Link 3</a> </p> <div id="p1_text">Text for Package #1</div> <div id="p2_text" class="hide">Text for Package #2</div> <div id="p3_text" class="hide">Text for Package #3</div>
     
    Doing it this way means that the text for all the packages will always be present on the page & can be seen by search engines. An alternative way to do this would be to replace the text....but the search engines wouldn't be able to see the text for the 2nd & 3rd links.
     
    If you change the div ID names, make sure that you set the first visible one in the javascript at the top to match.
  4. Like
    craftygeek got a reaction from welshhuw in 3 Colums - Background Image Issue   
    I'm guessing that the background image is applied to a div that encloses the columns, as there is no background image in the code you've placed above.
     
    I think it is probably due to the floats not being cleared before the Content div closes.
     
    Put this in your CSS:

    .clear { float: none; clear: both; }
     
    & immediately before the content div closes, put this:

    <div class="clear"></div>
  5. Like
    craftygeek got a reaction from finndogg in photoshop and dreamweaver   
    I'd suggest sticking with CSS - tables aren't used in modern markup.
     
    So you need to work out the component parts that you need to recreate your design. As it goes (compared to a lot of mine) yours is quite simple to sort out.
     
    So breaking it into sections...
     
    The border: chop this into 3 parts...the top edge with the curves, a part from the vertical middle section to tile on the y-axis & the bottom edge with curve...it'll be good practice to make all these separate images the same height - that way when you get a little cleverer with the coding, you can make them into a single CSS sprite (thats another topic though)
     
    Then the heading - cut out as small as possible & use as a background centered.
     
    The main background image in the middle is another.
     
    The dog at the bottom right will probably need to have the corner on it as well - I'd suggest having this as the background image to the content section.
     
    See if you can work it out from that....try to do it all using the images as div backgrounds - think about how it will need to be constructed in order for the images to work together & for the tiled vertical border to work.
     
    If you're still stuck shout out & I can help point the way with the construction as well.
  6. Like
    I think you'll have to pass on the info in the URL, if you set the index links to open something like services.html?service=boiler then get the service value from the URL with javascript & load content appropriately.
     
    Have a look at this to get started:
    http://www.netlobo.com/url_query_string_javascript.html
  7. Like
    You need to do something like:
     

    if(isset($_GET[service])){ $service = $_GET['service']; include('file/path/' . $service . '.html'); }
     
    you could pull out the contents of the file, but the include should do the trick.
     
    The if statement gives you some error protection in case you have a condition where service is not set in the URL...you may want to set a default in an else statement to cover this eventuality.
  8. Like
    With you trying to print $service it might be throwing an error & not getting any further with the script.
     
    try this:

    <div id="content_right"> <?php if(isset($_GET['service'])) { $service = trim($_GET['service']); } else { $service = 'boilers'; //sets default value } echo $service . '<br />'; include('services/' . $service . '.html'); ?> </div> <!-- END of DIV Content_Right -->

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.