Jump to content

catfish

Member
  • Posts

    115
  • Joined

  • Last visited

Posts posted by catfish

  1. Oh, that's fantastic! It's working better now. That is basically what I was doing but had it in the wrong place and a slightly different hook. Thanks so much. I just need to work with the styling. Thanks so much

    • Like 1
  2. I have mostly been using WordPress the past couple of years but need to ask for help with a new registered widget positioning. I was successful in that it shows up and I have some test content in there but the positioning is off. My website is at www.bluemeadowlandscaping.ca. You will see my text widget under the Tagline Turn ordinary into extraordinary! but I want to place it above the tagline. 

    This is my functions.php code

    <?php
    //* Start the engine
    include_once( get_template_directory() . '/lib/init.php' );
    
    //* Setup Theme
    include_once( get_stylesheet_directory() . '/lib/theme-defaults.php' );
    
    //* Set Localization (do not remove)
    load_child_theme_textdomain( 'minimum', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'minimum' ) );
    
    //* Add Image upload and Color select to WordPress Theme Customizer
    require_once( get_stylesheet_directory() . '/lib/customize.php' );
    
    //* Child theme (do not remove)
    define( 'CHILD_THEME_NAME', __( 'Minimum Pro Theme', 'minimum' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/minimum/' );
    define( 'CHILD_THEME_VERSION', '3.2.1' );
    
    //* Add HTML5 markup structure
    add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption' ) );
    
    //* Add viewport meta tag for mobile browsers
    add_theme_support( 'genesis-responsive-viewport' );
    
    //* Enqueue scripts
    add_action( 'wp_enqueue_scripts', 'minimum_enqueue_scripts' );
    function minimum_enqueue_scripts() {
    
    	wp_enqueue_script( 'minimum-responsive-menu', get_bloginfo( 'stylesheet_directory' ) . '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );
    	wp_enqueue_style( 'dashicons' );
    	wp_enqueue_style( 'minimum-google-fonts', '//fonts.googleapis.com/css?family=Roboto:300,400|Roboto+Slab:300,400', array(), CHILD_THEME_VERSION );
    
    }
    
    //* Add new image sizes
    add_image_size( 'portfolio', 540, 340, TRUE );
    
    //* Add support for custom header
    add_theme_support( 'custom-header', array(
    	'width'           => 320,
    	'height'          => 161,
    	'header-selector' => '.site-title a',
    	'header-text'     => false
    ) );
    
    //* Add support for structural wraps
    add_theme_support( 'genesis-structural-wraps', array(
    	'header',
    	'site-tagline',
    	'nav',
    	'subnav',
    	'home-featured',
    	'site-inner',
    	'footer-widgets',
    	'footer'
    ) );
    
    //* Unregister layout settings
    genesis_unregister_layout( 'content-sidebar-sidebar' );
    genesis_unregister_layout( 'sidebar-content-sidebar' );
    genesis_unregister_layout( 'sidebar-sidebar-content' );
    
    //* Unregister secondary sidebar 
    unregister_sidebar( 'sidebar-alt' );
    
    //* Remove site description
    remove_action( 'genesis_site_description', 'genesis_seo_site_description' );
    
    //* Rename primary and secondary navigation menus
    add_theme_support ( 'genesis-menus' , array ( 'primary' => __( 'After Header Menu', 'minimum' ), 'secondary' => __( 'Footer Menu', 'minimum' ) ) );
    
    //* Reposition the primary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_after_header', 'genesis_do_nav', 15 );
    
    //* Reposition the secondary navigation menu
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_footer', 'genesis_do_subnav', 7 );
    
    //* Reduce the secondary navigation menu to one level depth
    add_filter( 'wp_nav_menu_args', 'minimum_secondary_menu_args' );
    function minimum_secondary_menu_args( $args ){
    
    	if( 'secondary' != $args['theme_location'] )
    	return $args;
    
    	$args['depth'] = 1;
    	return $args;
    
    }
    
    //* Add the site tagline section
    add_action( 'genesis_after_header', 'minimum_site_tagline' );
    function minimum_site_tagline() {
    
    	printf( '<div %s>', genesis_attr( 'site-tagline' ) );
    	genesis_structural_wrap( 'site-tagline' );
    
    		printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
    		printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
    		echo '</div>';
    	
    		printf( '<div %s>', genesis_attr( 'site-tagline-right' ) );
    		genesis_widget_area( 'site-tagline-right' );
    		echo '</div>';
    
    	genesis_structural_wrap( 'site-tagline', 'close' );
    	echo '</div>';
    
    }
    
    //* Modify the size of the Gravatar in the author box
    add_filter( 'genesis_author_box_gravatar_size', 'minimum_author_box_gravatar' );
    function minimum_author_box_gravatar( $size ) {
    
    	return 144;
    
    }
    
    //* Modify the size of the Gravatar in the entry comments
    add_filter( 'genesis_comment_list_args', 'minimum_comments_gravatar' );
    function minimum_comments_gravatar( $args ) {
    
    	$args['avatar_size'] = 96;
    	return $args;
    
    }
    
    //* Add support for 3-column footer widgets
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    //* Add support for after entry widget
    add_theme_support( 'genesis-after-entry-widget-area' );
    
    //* Relocate after entry widget
    remove_action( 'genesis_after_entry', 'genesis_after_entry_widget_area' );
    add_action( 'genesis_after_entry', 'genesis_after_entry_widget_area', 5 );
    
    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'            => 'home-overlay',
    	'name'          => __( 'home overlay', 'minimum' ),
    	'description'   => __( 'text overlay in backstretch', 'minimum' ),
    ) );
    add_action( 'genesis_after_header', 'front_page_widget' );
    function front_page_widget() {
        if ( is_front_page() ) {
        genesis_widget_area( 'home-overlay', array(
        'before' => '<div class="home-overlay widget-area">',
        'after'  => '</div>',
        ) );
        }
    }
    genesis_register_sidebar( array(
    	'id'          => 'site-tagline-right',
    	'name'        => __( 'Site Tagline Right', 'minimum' ),
    	'description' => __( 'This is the site tagline right section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-featured-1',
    	'name'        => __( 'Home Featured 1', 'minimum' ),
    	'description' => __( 'This is the home featured 1 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-featured-2',
    	'name'        => __( 'Home Featured 2', 'minimum' ),
    	'description' => __( 'This is the home featured 2 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-featured-3',
    	'name'        => __( 'Home Featured 3', 'minimum' ),
    	'description' => __( 'This is the home featured 3 section.', 'minimum' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-featured-4',
    	'name'        => __( 'Home Featured 4', 'minimum' ),
    	'description' => __( 'This is the home featured 4 section.', 'minimum' ),
    ) );
    //* Customize the entire footer
    remove_action( 'genesis_footer', 'genesis_do_footer' );
    add_action( 'genesis_footer', 'sp_custom_footer' );
    function sp_custom_footer() {
    	?>
    	<p>&copy; Copyright 2017 <a href="bluemeadowlandscaping.ca/">Blue Meadow Landscaping Ltd.</a> &middot; All Rights Reserved &middot; <a href="http://bluemeadowlandscaping.ca/wp-admin">Admin</a></p>
    	<?php
    }

    This is my css style

    .home-overlay {
    	min-height: 200px;
    }
    
    .home-overlay .wrap {
    	padding-top: 180px;
    	width: 80%;
    }
    
    .home-overlay .widget {
    	width: 55%;
    }
    
    .home-overlay p,
    .home-overlay .widget-title {
    	color: #fff;
    	font-size: 30px;
    	line-height: 1.4;
    	text-shadow: 1px 1px #000;
    	text-transform: none;
    }

     

  3. I'm sorry for my abcense after you kindly replied to me. This is still an issue but I had it on the back burner. I need to get on it and resolve it I suppose. Not sure the client even is aware of it. Obviously not. 

    No Stefan this is not Wordpress, nor any CMS. As I said, this has not happened to me before, do you think this is up to me to fix the site for this client for free or is it something I can charge them for my time on this? 

     

    Thankyou

  4. This has never happened to me before and not sure what to do now. I just happened to look at a site that I built a couple of years ago. I haven't heard from the owner in a while but was just checking on some sites. Seems to me that I had used a toggle type script probably from Dynamic Drive. I used to go there a fair amount. So it looks like everywhere I had the script now has an image (no link) but says Click and discover Imageshack. What can I do now? Here is the link..

     

    markatwines.com/red_wines.php

     

     

    [We do not like active links, it tends to send spammers and bots to the sites, cheers!  - LSW]

  5. I've spent all morning preparing this link for testing purposing so I can maybe (hopefully) make it easier to get some help. I previously built a custom website for a client which they like very much. He is a welder so you will see how the gaudy border comes into play (LOL). I managed to build the border and it works well enough in all 5 browsers but I know it isn't the proper way of building a border these days. here is the link but its just to show the border

    I am in the development stage of redoing the website in Wordpress and trying to do the border on it properly. So for testing purposing I started this page using examples and small tutorials. You will see my metal border and border-radius works on 3 out of those 5 browsers. Here it is Border Testing

    I don't imagine I need to paste all the code in here but will do so to save time;

    #wrap{
    margin:100px auto;
    padding: 12px;
    width:400px;
    height:300px;
    border: 18px solid pink;
    -moz-border-radius: 15px;
    border-radius: 15px;
    }
    
    #wrapper2{
    margin:100px auto;
    padding: 12px;
    width:300px;
    height:auto;
    border: 18px solid green;
    -moz-border-radius: 15px;
    border-radius: 15px;
    }
    
    /********I REALLY WANT THIS METAL BORDER TO WORK***********/
    
    #metal-border{
    position:relative;
    margin:100px auto;
    padding: 12px;
    width:400px;
    height:300px;
    border-style: solid;
    border-width: 31px 29px 32px 26px;
    -moz-border-image: url(images/outer_border.png) 31 29 32 26 round;
    -webkit-border-image: url(images/outer_border.png) 31 29 32 26 round;
    -o-border-image: url(images/outer_border.png) 31 29 32 26 round;
    border-image: url(images/outer_border.png) 31 29 32 26 round;
    }
    
    .box {
    -moz-border-radius: 15px; /* Firefox */
    -webkit-border-radius: 15px; /* Safari and Chrome */
    border-radius: 15px; /* Opera 10.5+, future browsers, and now also Internet Explorer 6+ using IE-CSS3 */
    
    -moz-box-shadow: 10px 10px 20px #000; /* Firefox */
    -webkit-box-shadow: 10px 10px 20px #000; /* Safari and Chrome */
    box-shadow: 10px 10px 20px #000; /* Opera 10.5+, future browsers and IE6+ using IE-CSS3 */
    
    behavior: url(ie-css3.htc); /* This lets IE know to call the script on all elements which get the 'box' class */
    }
    
    .box2 {
    width: 200px;
    height: 150px;
    margin: 0 auto 35px auto;
    padding: 15px;
    border: 11px solid #c6ac6c;
    position: relative;
    margin-top: 35px;
    -moz-border-radius: 32px;
    -webkit-border-radius: 32px;
    border-radius: 32px;
    -moz-box-shadow: 10px 10px 10px #000;
    -webkit-box-shadow: 10px 10px 10px #000;
    box-shadow: 10px 10px 10px #000;
    z-index: 2;
    behavior: url(ie-css3.htc);
    }
    
    .rounded-corners {
    -moz-border-radius: 20px;
    -webkit-border-radius: 20px;
    -khtml-border-radius: 20px;
    border-radius: 20px;
    }
    

     

    HTML

    <div id="container">

    <div id="metal-border">one I really want for my container

    </div>

    <div id="wrap" class="box">Lorem ipsum dolor sit amet, consectetuer

    adipiscing

    elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna

    aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud

    exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea

    commodo consequat. <br>

    <br>

    Duis autem vel eum iriure dolor in hendrerit in

    vulputate velit esse molestie consequat, vel illum dolore eu feugiat

    nulla facilisis at vero eros et accumsan et iusto odio dignissim qui

    blandit praesent luptatum zzril delenit augue duis dolore te feugait

    nulla facilisi.

    </div>

    <div class="box2">this is the cat box code copied from

    http://fetchak.com/ie-css3/

    seems to work in all but Internet Explorer and Opera</div>

    <div id="wrapper2" class="rounded-corners">

    <img src="images/present-tree.png" align="middle"></div>

    </div>

  6. Hello, I'm trying to build these boxes using the div class and within the boxes an image header, a title and some text content. I want my image to be at the top of the box with no padding around it. I'm actually using wordpress but the silly editor window keeps putting paragraph tags in where I did not. Strange, it seems to look pretty good and all of a sudden it changes on me. Is this possible? Anyways here is my code that I'm using.

    .box{
    border-radius: 5px;
    box-shadow: 0 1px 2px #ccc;
    background-color: rgba(206,132,133,0.5);
    height:auto;
    width:270px;
    margin-bottom: 20px;
    margin-top:0px;
    padding-top:0px;
    }
    
    .box p{
    padding:6px 10px 4px 10px;
    }
    
    .box ul li{
    list-style-type: none;
    margin: 0 0 0 30px;
    padding: 0;
    }
    
    .box img{
    margin-bottom:0;
    padding-bottom:0px;
    }
    
    .box h3{
    text-align:center;
    color:#800000;
    font-size:24px;
    font-weight:bold;
    line-height:normal;
    margin:0;
    padding:0;
    }
    

     

    [one-third-first]
    <div class="box">
    
    <img class="aligncenter size-full wp-image-161" alt="massage-head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/massage-head.jpg" width="270" height="130" />
    <h3>Massage</h3>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy.
    <ul>
    <li>Back Massage - $25
    <em>25 minutes</em></li>
    <li>Body Massage - $55
    <em>60 minutes</em></li>
    </ul>
    </div>
    <div class="box">
    
    <img class="aligncenter size-full wp-image-175" alt="facials_head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/facials_head.jpg" width="270" height="130" />
    <h3>Facials</h3>
    Ladies and gentlemen too! Relax with a cleanse and tone & mask. A relaxing facial massage, hot towels and moisturizer. 50 minutes
    <ul>
    <li>Aromatherapy Facial - $60.00</li>
    </ul>
    </div>
    [/one-third-first]

     

    I keep removing the <p></p> but when I go back and view the html code I see this again. paragraph tags inserted around my columns and my images??

    <p>[one-third-first]</p><div class="box"><p><img class="aligncenter size-full wp-image-161" alt="massage-head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/massage-head.jpg" width="270" height="130" /></p><h3>Massage</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy.</p><ul><li>Back Massage - $25<br /> <em>25 minutes</em></li><li>Body Massage - $55<br /> <em>60 minutes</em></li></ul></div><div class="box"><p><img class="aligncenter size-full wp-image-175" alt="facials_head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/facials_head.jpg" width="270" height="130" /></p><h3>Facials</h3><p>Ladies and gentlemen too! Relax with a cleanse and tone & mask. A relaxing facial massage, hot towels and moisturizer. 50 minutes</p><ul><li>Aromatherapy Facial - $60.00</li></ul></div><p>[/one-third-first][one-third]</p><div class="box"><p><img class="aligncenter size-full wp-image-163" alt="AdjWaxing-head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/AdjWaxing-head.jpg" width="270" height="130" /></p><h3>Waxing</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><ul><li>Brow  - $15.00</li><li>Lip  - $10.00</li><li>Chin  - $10.00</li><li>Half Arm - $25.00</li><li>Full Arm - $30.00</li><li>Half Leg - $35.00</li><li>Full Leg - $50.00</li><li>Bikini - $28.00</li><li>Back - $40.00 and up</li></ul></div><p>[/one-third][one-third]</p><div class="box"><p><img class="aligncenter size-full wp-image-165" alt="eyes-head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/eyes-head.jpg" width="270" height="130" /></p><h3>Tinting</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p><ul><li>Lash Tint $20.00<br /> <em>Gives your lashes more depth</em></li></ul></div><div class="box"><p><img class="aligncenter size-full wp-image-176" alt="nails_head" src="http://mirrahairlounge.com/wp-content/uploads/2013/11/nails_head.jpg" width="270" height="130" /></p><h3>Hand Care</h3><p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p></div><p>[/one-third]</p>

  7. I just went and checked out the plugin. There is little to no documentation on it. Give this one a try I have used it and they have great support. http://simple-press.com/ They have a forum where you can go and ask the developer a question if something does not work. And he gets back to you quickly with an answer.

    Thankyou so much, I just had a quick look at it but will spend more time. I sent a question to their contact and got a brief response but it was indeed very quick.

    They said they have a template tag plugin. Have you yourself used it in a wordpress sidebar?

    Also, I guess it can be installed in a sub folder?

  8. Thankyou, I appreciate your reply. I will try to deactivate some of the other plugins and see what happens.

    So, I deactivated a few of the other plugins to see if they were messing things up and that didn't work. The link for the MYBB Last Topics had some very very brief instructions. It said "Place <?php lasttopics(); ?> in your templates and [lasttopics] in page or post." I didn't know where in the template to put the php line so I placed it at the very end of the function.php file and it gave me an error. So I added it to a text widget in my wordpress sidebar and then I added [lasttopics]to one of my pages and it actually worked but it's not what I wanted. So, where abouts would I place that php line without messing things up. Here is my functions.php code

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );
    
    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', 'Education Theme' );
    define( 'CHILD_THEME_URL', 'http://www.studiopress.com/themes/education' );
    
    /** Create additional color style options */
    add_theme_support( 'genesis-style-selector', array( 
    'education-black'	=> __( 'Black' , 'education' ), 
    'education-green'	=> __( 'Green' , 'education' ), 
    'education-purple'	=> __( 'Purple' , 'education' ), 
    'education-red'		=> __( 'Red' , 'education' ), 
    'education-teal'		=> __( 'Teal' , 'education' ) 
    ) );
    
    add_action( 'genesis_meta', 'education_add_viewport_meta_tag' );
    /** Add Viewport meta tag for mobile browsers */
    function education_add_viewport_meta_tag() {
    
       echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    
    }
    
    /** Add new image sizes */
    add_image_size( 'featured-image', 466, 130, TRUE );
    
    /** Add structural wraps */
    add_theme_support( 'genesis-structural-wraps', array(
    'header', 
    'nav', 
    'subnav', 
    'inner', 
    'footer-widgets', 
    'footer' 
    ) );
    
    /** Add support for custom background */
    add_theme_support( 'custom-background' );
    
    /** Add support for custom header */
    add_theme_support( 'genesis-custom-header', array( 
    'width' => 1140, 
    'height' => 120 
    ) );
    
    /** Add support for 3-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 3 );
    
    /** Reposition Primary Navigation */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_nav' );
    
    /** Reposition Secondary Navigation */
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_subnav' );
    
    /** Reposition Breadcrumbs */
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    add_action( 'genesis_before_content', 'genesis_do_breadcrumbs' );
    
    add_filter( 'genesis_comment_list_args', 'child_comment_list_args' );
    /** Change avatar size */
    function child_comment_list_args( $args ) {
    
       $args = array(
    		'type' => 'comment',
    		'avatar_size' => 33,
    		'callback' => 'genesis_comment_callback'
    	);
    
    	return $args;
    
    }
    
    /** Register widget areas */
    genesis_register_sidebar( array(
    'id'			=>	'slider',
    'name'			=>	__( 'Slider', 'education' ),
    'description'	=>	__( 'This is the slider section.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id'			=> 	'intro',
    'name'			=>	__( 'Intro', 'education' ),
    'description'	=>	__( 'This is the intro section displayed below the slider.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id'			=>	'featured',
    'name'			=>	__( 'Featured', 'education' ),
    'description'	=>	__( 'This is the featured section displayed below the intro.', 'education' ),
    ) );
    genesis_register_sidebar( array(
    'id'			=>	'call-to-action',
    'name'			=>	__( 'Call To Action', 'education' ),
    'description'	=>	__( 'This is the call to action banner.', 'education' ),
    ) );
    /** Customize the credits */
    add_filter( 'genesis_footer_creds_text', 'custom_footer_creds_text' );
    function custom_footer_creds_text() {
       echo '<div class="creds"><p>';
       echo 'Copyright © ';
       echo date('Y');
       echo ' · <a href="http://wiga.ca/">WIGA</a> · Built on the <a href="http://www.studiopress.com/themes/genesis" title="Genesis Framework">Genesis Framework</a>';
       echo '</p></div>';
    }

    Thanks. I have a splash page up at the moment while working on the site but would remove it for now if someone could help me and needs to see it.

  9. Check the documentation there should be a link to their site. Also it could be that the widget is not playing nice with another one. Disable one at a time to see if this fixes it. This is all about all that I can say without looking at the site. With wordpress it could be a number of things.

    Thankyou, I appreciate your reply. I will try to deactivate some of the other plugins and see what happens.

  10. Hello, I have recently starting using Wordpress. This time I also have a forum built with MYBB. There are a couple of widgets for use called MYBB latest posts and also MYBB latest Topics. The widgets allows the posts to go in the sidebar of the Wordpress much like the regular wordpress "latest posts" widget I suppose but I can't get either of them to work. I wonder if anyone else has used or tried this.

  11. He is right you do not need the html but if you want it you can put this * body {body code} The * is shorthand for html.

     

    The code looks good to me. But remember IE 7 and 8 can balk at all % and ems for font size so put the body font size to px. Believe it or not there are still people out there with IE7 and 8. I had a meeting with a client on Thur. he still had IE7 in his office and at our local college they still have IE8.

     

    In your nav when I hover over the links they all but disappear.

     

    You really do not need a back to top link the page is not long enough. But here is a better way of doing it using jQuery. In your head put this

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

     

    And put this in a folder something like _jQuery with a file in it named something like javascript.js

     

    //scroll to top link
    $(document).ready(function() {
    $('.top').click(function(){
    	$('html, body').animate({scrollTop: 0}, 3000);
    });
    });
    //the html
    <p id="backtop" ><a class="top" href="#">AUTO SCROLL BACK TO TOP</a></p>
    

     

    The Top: 0 is the top of the page, The 3000 is how many seconds it takes to scroll to top.

     

     

    Then put a link to the file just before your closing body tag to the _jQuery folder like this

    <script type="text/javascript" src="_jQuery/javascript.js"></script>

     

    You can see this in action on my site on the portfolio page. Link at the bottom. (Still working on site.)

     

    If you want the year of the copy right, although not required, it is generally with the year the site is built to the current year and you can do this with one line of PHP.

     

    <p id="copyRight">© 2008 - <?php echo date("Y") ?> - name of site here</p>

    Thank Andrea for the php she is where I got it from.

     

    The php block will change the year automatically, you do not need it in <p> tag it is just the way I center it. Also if you add this all of your files will now have to be .php not .html or .htm do not forget to change your links also.

     

    I know this is way more then you asked for but what the heck. :D

    Yes, this was way more than I asked for it but LOVE those little bits of code I never knew! I've added them to a couple sites now. Thankyou all for that.

  12. Personally I do not see a problem with the 12px that you have for font size on your links. I would leave it alone. One thing you could do is add a line height to center the text.

     

    Also this is just a little piece of advice. You should pick a word separator meaning the underscore or camel casing and stick to it. I see both and none in your code. It will make it easier for you in the long run when you write your css, call an id or class with PHP or Javascript, you will not have to go back and see what you did because it will always be the same. And if you ever work on a team your team members will like you better.

     

    Ok, thankyou for the advise. I will try to remember that. So I'll post my new code and link using the % and em. I just want to be sure that if I go with this font sizing that I am doing it correctly. My link..My link and a portion of my code..

    html {
    height:100%;
    font-family: "Century Gothic", Arial, Helvetica, sans-serif;
    }
    
    body {
    margin: 0px;
    padding: 0;
    background-image: none;
    background-repeat:repeat;
    background-color: #000;
    font-family: "Century Gothic", Arial, Helvetica, sans-serif;
    color:#000;
    font-size: 62.5%;
    }
    
    #container{
    width:872px;
    margin:0 auto;
    background-color: #fff;
    border-right:3px solid #3160ac;
    border-left:3px solid #3160ac;
    font-size:1.4em;
    }
    
    .passion{
    font-family: "Papyrus";
    color:#3060ad;
    font-size: 1.5em;
    width:100%;
    text-align:center;
    }
    
    #navcontainer ul
    {
    font-family: "Papyrus";
    height:21px;
    padding:6px 0 2px 0;
    margin: 0;
    list-style-type: none;
    background-color: #000;
    color: #fff;
    width: 100%;
    font-size:.85em;
    font-weight:bold;
    text-align: center;
    border-bottom:2px solid #3160ac;
    border-top:2px solid #3160ac;
    }
    
    li { display: inline; }
    
    li a
    {
    text-decoration: none;
    background-color: #000;
    color: #fff;
    padding: 0 30px;
    }
    
    li a:hover
    {
    background-color: #000;
    color: #3160ac;
    }
    
    #contact_line{
    clear: both;
    background-color:#000;
    color:#fff;
    height:24px;
    padding:3px 32px;
    border-bottom:2px solid #3160ac;
    border-top:2px solid #3160ac;
    font-size:1em;
    }
    #footer {
    clear: both;
    background-color:#000;
    padding: 0 32px;
    height:30px;
    text-align: center;
    border:0;
    color:#3160ac;
    width:812px;
    margin:10px auto;
    font-size:1.3em;
    }
    

  13. I feel a bit lost with regards to font-sizing in my css. I have a site that I am trying to change to em and % and also trying to use the stupid Papyrus for heading and navigation heading. I'm struggling as I have divs inside divs and not sure where I need to put my em and %. Here is a link to the site before I go too much farther.My link

     

     

    My biggest concern is my use of em and % but also my font-family's and using Papyrus font.

    Still reworking the codes, so I removed the css for now

  14. Safari shows a different font size as IE, Mac will be different from Windoiws as Mac uses a different default font than windows. Of course mine will look different as all my browsers are set to 11pt and Tahoma.

     

    PS - always use points and not pixels for font sizes. When you set the sizes, use % or EM, this makes the text flexible to fit the users default choices.

     

    Default = 100% or 1em

     

    Smaller (maybe the copyright) = 80% or .8em

     

    Bigger (Like H Tags) = 120% or 1.2em

     

    EM stands for the size of the capital "M" in the users default font and size.

     

    Also keep in mind that not every OS will have the same Fonts. I believe Mac does not have Arial.

    I know this is an old post and I can't believe I am back asking about fonts but I am. Client wants to use century gothic for the body of the website and Papyrus for h1, h2 headings as well as navigation heading links. I have over the last year regularly used verdana and a font-size of 14px I think but while building a new site and testing in different browsers if the viewer has their monitor settings at text large etc then this pushes the content out of boxes etc. I need a refresher on font-family and font-size. And what would I use in the font stack with Papyrus that is similar in shape and size? and also the Century Gothic. When do I use pt and when to use em? Thanks so much

  15. Give each page a body id - for example:

    <body id="indexP">
    <body id="contactP">
    <body id="aboutP">
    

    in your navigation, give each item another id:

    <ul>
    	<li id="index"><a href="index.php">Home</a></li> 	
    	<li id="about"><a href="about.php">Photos</a></li>
    	<li id="contact"><a href="contact.php">Contact Us</a></li>
    	</ul>
    

    and your CSS will be like this:

     

    #indexP #index a, #aboutP #about a, #contactP #contact a { 	background: #aaccbc; 	color: #221523; 	}

    That's fantastic. Thanks so much, I've got it now.

  16. This page http://www.wickham43.net/highlighthome.php shows several methods.

     

    The first item is very basic and not suitable for inclusion in an "include" file.

     

    The second and third items are similar, for text links or image links, both using only CSS and a "matched pairs" coding. You put the li tags in the "include" file and put a different id or class to the ul tag or body tag on every page, so the id or class for the ul or body tag will only match one of the li tags on each page, changing its style. In the third item I deliberately coded it so that the About Us tab disappears on the About Us page, as it's not wanted for its own page, and only the other tabs show.

     

    The fourth item is using PHP.

     

    I'm just working on this now and I can't seem to make it work. What I am trying to get away from is editing every page each time a product is added or discontinued. What I am used to doing is using the include file so there is only 1 file to edit but the way I have been doing it I can't highlight my current page. It seems to me working through options 2 to 4 I need to place my page links on each page regardless and not just in an include page. My link again is http://www.avianorganics.com/cajun_trails.php

  17. This page http://www.wickham43.net/highlighthome.php shows several methods.

     

    The first item is very basic and not suitable for inclusion in an "include" file.

     

    The second and third items are similar, for text links or image links, both using only CSS and a "matched pairs" coding. You put the li tags in the "include" file and put a different id or class to the ul tag or body tag on every page, so the id or class for the ul or body tag will only match one of the li tags on each page, changing its style. In the third item I deliberately coded it so that the About Us tab disappears on the About Us page, as it's not wanted for its own page, and only the other tabs show.

     

    The fourth item is using PHP.

    Thankyou, I'm going to have a look at it now...

  18. I love php includes and use this method as much as possible, however my question is when I have built a menu that uses specific styles for the active link page I don't know how to do it. My site in question in http://www.avianorganics.com The left hand menu shows the active page is a different background color. Can someone help me with the php includes for this. Thankyou

  19. Thanks Virtual, I wasn't completely sure. Catfish please find out what the target audience will be using. Computers vs phones and ipads. Then decide if you need to find another solution.

    Hello and thanks for replying. The client saw the flash working on my PC but after viewing it on her own MAC told me it doesn't work. then I checked it on my iPhone and it doesn't work. So, what is the 'other solution'? Is there a fix for the MAC?

×
×
  • Create New...