Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    ffx/ie goof and a question

    I got it looking exactly the way I want.

    www.chipper.com

    Problem 1:

    I use Firefox and it look good, but I took a look in IE to make sure all was good. In IE it puts a grey separator between all of the buttons on my navbar, Not a big deal I can live with it if I have to.

    Problem 2:

    I intend to add more buttons to my navbar as I add info to the site. Which is the main reason I decided to learn CSS. Is there anyway to put html in my external css so I wont have to go to every html doc on my site and add the line

    <li><a href="whatever.htm" title="whatever">Whatever</a></li>

    My ultimate goal is to have 1 master css template that all I have to do is add the center text to. As well if I want to make an ad or navbar change I can do do it from the CSS and update every page on the site.

    Did that make sence...I hope so.

    And lastly problem3:

    Why can I not indent my text? It is pressed right up gainst the edges of the field. (fixed)
    Last edited by chipperi; 12-30-2007 at 01:12 PM.

  • #2
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Awh.
    1. Put this code at the top of your file:
      Code:
      * { margin: 0; padding: 0; }
      It generally resolves issues like that.
    2. Your best bet is PHP. Give all your pages with the .php extension, instead of .htm or .html. Take out your nav. bar and put it in a file named navbar.php. Then, where you want the bar, insert this bit of PHP code
      PHP Code:
      <?php include("navbar.php"); ?>

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    The 'included' file will be parsed as html by default, so the included file could remain as an html file.
    Code:
     <?php include("navbar.html"); ?> 

    If it contains no php code, it will run quicker if you declare it as html, too.

    Of course, the calling page would need to be a php file extension, unless you alter your .htaccess file to send all html through the php parser. Easy enough to do, but it also slows down the pages a bit.

    Also, your page is set to run in Quirks Mode.
    THere is a Sticky about Which Doctype to use on a page. I suggest you have a read and change your Doctype to suit your coding.
    And run it through the w3c validator. A few things to change.

    Image tags should be closed with a slash <img ... />
    and the ampersands in the links should be html entities "&amp;" to cure a few things.

    Not much you can do about the Warnings from the Ad scripts...
    Last edited by jlhaslip; 12-30-2007 at 05:02 PM.

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    A very minute time. I say PHP because your navigation bar is one of the most likely candidates for treatment by a server-side language.

    Seeing as he's triggering use of an SGML parser, he doesn't need to use empty element closing tags?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •