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.
Page 1 of 2 12 LastLast
Results 1 to 15 of 21

Thread: Doc Type

  1. #1
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Question Doc Type

    Why when i add a doc type to my website do all the fonts get bigger?

    I have tried adjusting them in the css but they remain big??

    The doc type i am using is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    Please help me!

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Quote Originally Posted by xdous View Post
    Why when i add a doc type to my website do all the fonts get bigger?

    I have tried adjusting them in the css but they remain big??

    The doc type i am using is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    Please help me!
    What Browser?

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Sorry it works in IE 7 but not in firefox

  • #4
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    Adding the Doctype changes the "rules" used by your site.

    If you post a link to your site, someone may be able to offer some assistance.

  • #5
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    The link to the website is http://outdoor-signs.co.uk/

  • #6
    Regular Coder
    Join Date
    Feb 2007
    Location
    Canada
    Posts
    924
    Thanks
    10
    Thanked 56 Times in 55 Posts
    You can use the h1 - h6 tags to change font sizes and give your page content some semantic structure at the same time.

    For the Main content area, change the font sizes by altering the css file p and p2 classes.

  • #7
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    When you say semantic structure do you mean make my code neater?

    If so then i have done this now.

    You think i should use h tags to re size text?

  • #8
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    Just adding a doctype does not make your page valid code. Forcing the XHTML Strict doctype that you posted in your first post, results 103 errors on your page.

    http://validator.w3.org/
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #9
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    I know it doesnt make it doesnt mean my website is valid. I just want to add the doctype.

    I have validated webpages before. I was just querying why the font changes.

  • #10
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,147
    Thanks
    2
    Thanked 333 Times in 325 Posts
    As jlhaslip wrote -
    Quote Originally Posted by jlhaslip View Post
    Adding the Doctype changes the "rules" used by your site.
    There are a number of font size related CSS errors as well and warnings that indicate class names are not being recognized and applied that will get interpreted differently depending on what mode/mood the browser is in - http://jigsaw.w3.org/css-validator/v...usermedium=all

    When there are errors present that effect how or even if a browser sees and interprets the code and css, anything can happen. Make the page valid code first, then address any font size problems. Otherwise you will just be spinning your wheels fixing symptoms that will keep changing as other things get fixed.
    Last edited by CFMaBiSmAd; 10-23-2007 at 04:52 PM. Reason: add
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #11
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    http://creativecoding.webforumz.com/.../semantics.php

    You may find this site useful.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #12
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Thanks for this link.

    Makes more sense.

    But I dont see why my code is that bad.

    I cant seem to find anything that says my code is not semantic web design whats everyone elses thoughts?

  • #13
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Just a thought-

    Have you tried to validate your code.

    http://validator.w3.org/

    It is free. If it's any comfort; I have trouble with this semantic thing.

    Have a look at the url in my signature. There's plenty of stuff there.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #14
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,918
    Thanks
    6
    Thanked 1,040 Times in 1,013 Posts
    Quote Originally Posted by effpeetee View Post
    Just a thought-
    Have you tried to validate your code.
    http://validator.w3.org/
    It is free. If it's any comfort; I have trouble with this semantic thing.
    Have a look at the url in my signature. There's plenty of stuff there.
    Frank
    Just a hint: CFM…whatever has already found faults with his code a couple of posts before and advised him do validate, and if xdous is refusing to clean up that mess then there’s no help for him.

    xdous: Your code is very, very, very far from being semantic. Before asking why you should learn what “semantic” actually means. Wikipedia is the first source for such definitions. Secondly you need to understand what semantic code actually is. One thing that is definitely not semantic is using tables to create a page layout (which you did).

    And also: valid code is a huge help to find out why strange things are happening. If your code is valid and semantic you can at least exclude errors in the code itself being the cause of a problem.

  • #15
    New Coder
    Join Date
    Oct 2007
    Posts
    86
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Cheers VIP. The link effpeetee sent me explains what semantic code is. And if you read this and look at my code im not really doing nothing wrong. I dont want my page to be xhtml strict.

    I want it to be xhtml transitional which allows you to use tables which is why i have.

    I have made a perfect xhtml strict page in the passed which passed all validation so i know how to do this but for this site i did not want to.

    So cheers for your comment though .


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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