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 6 of 6
  1. #1
    New Coder
    Join Date
    Feb 2005
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    First CSS site - any suggestions?..

    Hi there,
    I just had my first go at using CSS to make the beginnings of a site and I figure it's good to get some feedback.

    Can you tell me anyways I should improve on my CSS/html here: http://www.jamesmawdsley.com/ . You can view the style sheet here: http://www.jamesmawdsley.com/layout1c.css.

    In particular I'm not sure about text sizing. I have gathered what I can from tutorials etc...but things still seem weird. For example, my text doesn't seem to scale up and down in small increments when increasing the text size in browsers (notably Mac Safari)...?. Instead it seems to jump alot, unlike this site for example.

    All suggestions will be greatly appreciated.

    Many thanks.

    Andrew.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unpredictable

    The whole text sizing issue still is a bit of a minefield since different browsers treat different techniques of text sizing, well, differently.

    I find Owen Briggs' method of combining a percentage with an em size still one of the most compelling and kind-of-predictable approaches; I have no idea how this works in more recent browsers like Safari since he hasn't updated his pages to reflect those. You might want to give it a try, though (by the way: I use the percentage on the html element and em sizes on anything else).

    Other remarks:

    Why do you use a ful external style sheet and still keep a number of style rules internal? Trying something out, perhaps?

    I'd recommend removing the xml prolog; it throws IE6.0/win back in quirks mode. Instead, use a meta element to set the character encoding (I know, the xml prolog is the "proper" way, and it would be in a world where everybody uses "proper" browsers, but not everybody does -yet).

    I noticed a couple of hx elements inside a p; this is not correct use of p elements. Instead, place the hx's separate before starting a p, or leave off the p altogether (like in: "<p><h5>This website will be completed shortly</h5></p>").
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    New Coder
    Join Date
    Feb 2005
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks Ronald. Much appreciated.
    The Owen Briggs method is the one I have used. I will have another tinker with it...

    There are some internal style rules because...well, yes, because I'm just figuring out what does what and how to do it...and because I'm not so sure on the content of the rest of the site so I guess I'll be able to put most styling into external sheet once thats sorted.

    XML prolog. Got it. Thanks. Didn't know that. Have removed it. But being an amatuer...what do I put, if anything in it's place? ... can you tell what I should do here?

    Cheers for the heads up on the proper way with H and P tags....will do.

    Thanks alot.

    Andrew.

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Greetings DimFish,

    I like the overall layout. Nice and clean. The color scheme and font choices seem appropriate for the context.

    One consideration is making sure you're adhering to what's valid for your declared DOCTYPE.

    Stick to lower case, this:
    Code:
    <IMG STYLE="position:relative; Top:0px; Left:0px; WIDTH:200px; HEIGHT:171px" ; SRC="images/james1.jpg" alt="James Mawdsley"></img>
    ...should be this:
    Code:
    <img style="position:relative; top:0px; left:0px; width:200px; height:171px;" src="images/james1.jpg" alt="James Mawdsley" />
    Note also you don't need the </img> tag. Just add the closing slash prior to the closing bracket. This also applies to your <br> tags, code them as <br />. Or better yet, get rid of them completely, by using semantic mark-up. Search google for 'semantic xhtml'.

    Here's a link to your page's validation report: http://validator.w3.org/check?verbos...smawdsley.com/
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Meta element

    The usual way would be to use a meta element:
    Code:
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    I must say I'm no expert in this field and I'm sure there are some who would cheerfully bite my head off; as I understand, the server should be configured to send out content type and character set information in a HTTP header, and said meta data serves as a sort of backup.
    Sending an XHTML document as "text/html" is not perfect, but since your page is typed as XHTML 1.0, it will do. Other content types again cause trouble for the same browser the xml prolog causes trouble for (yeah, that one again).
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #6
    New Coder
    Join Date
    Feb 2005
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks people. Great stuff.
    I'll be back with more questions soon as you've been top help.
    Best,
    Andrew.


  •  

    Posting Permissions

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