SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: HTML Help!!

  1. #1
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    HTML Help!!

    I've customized a template and finished coding it last night, but what I have come to realized after looking at the site from different computers is that the navigation and content sections will move depending on the screen resolutions.

    What code can I use so that my sections will stay in place in all resolutions?

    Thanks.

  2. #2
    Who is Mr Blonde? Mr Blonde's Avatar
    Join Date
    Sep 2006
    Location
    Gold Coast, QLD
    Posts
    359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If your using tables for your layout you can add a fixed width to the table so it wont be liquid.

    Otherwise CSS is a good option if you are familar with it.
    Heavens Rejects : Online Clothing Store
    Alternative Clothing : Mr Blonde
    Front end development : By the Webfella

  3. #3
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,
    This is the least of your worries. I had a quick look through your code and there are gazillions of errors in there. I'll list some of the major ones I saw. There's heaps of tutorials on this type of stuff on the web so just do some Google searching:

    No DOCTYPE. All HTML files have to have one.

    No CSS at all. CSS should be used instead of <FONT> tags etc.

    Paragraph tags should always contain content between the opening and closing tags. You have a bunch of these <p class=head></p> followed by the text. The text should be between the <p class=head> and the </p>.

    <BODY> tags must be closed. The opening tag <BODY> is after </HEAD> (where it should be) but you don't have one before </HTML> which you definitely need.

    Tables shouldn't be used for layout purposes. This is an old technique which is rapidly losing favour. CSS should be used for layout purposes instead.

    Ryan,

  4. #4
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by </dork> View Post
    I've customized a template and finished coding it last night
    I think you need a better template. That one is awful. I don't know of any good ones myself as I've never used one, but if you check that they validate first at http://validator.w3.org/ you'll atleast know there are no errors in them.

    Ryan,

  5. #5
    SitePoint Member
    Join Date
    Aug 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, so how exactly would you use CSS with html in one document?

    Because I've used CSS and HTML, but I've used them in seperate documents.

    And how do I use doctype? Thanks.

  6. #6
    Who is Mr Blonde? Mr Blonde's Avatar
    Join Date
    Sep 2006
    Location
    Gold Coast, QLD
    Posts
    359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    One example of using CSS in a document is to use inline CSS to replace ugly font tags with something like:
    HTML Code:
    <span style="font-size:18px; color:#FF0000; font-weight:bold;">text here</span>
    Have a read in the CSS Forum for an idea all the excellent uses.
    Also you can find a list of doctypes here. Insert it into the beginning of your document to tell it how to behave.
    Heavens Rejects : Online Clothing Store
    Alternative Clothing : Mr Blonde
    Front end development : By the Webfella

  7. #7
    SitePoint Wizard ryanhellyer's Avatar
    Join Date
    Oct 2006
    Location
    New Zealand
    Posts
    2,323
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the scope of what you are asking is too broad to be covered here.

    In a nutshell though ...

    You can either use CSS styles in your html file as per MrBlondes post.

    Or you can link to it as an external style sheet, this is definitely the best way to do it as you can then just alter the style sheet and this will change the styling across your entire site, rather than just the page you are on.

    Or you can place the CSS between style tags in your head section.

    FYI, a DTD basically tells the browser how to render the web page. If you don't supply one the browser will go in to what is known as quirks mode and render it however it sees fit (usually not how you want it to).

    I started learning CSS a few months ago (August I think) and I haven't looked back. Designing web pages becomes exponentially easier and faster.

    Good luck with the web designing

    Ryan,

  8. #8
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by </dork> View Post
    What code can I use so that my sections will stay in place in all resolutions?.
    Resolution isn't that important - it's browser viewport size... I hardly ever have my browser window at full size for example. You need to create a 'flexible' layout -using either a css layout or a table layout - whatever you are more comfortable with at the moment.

    What browsers have you tested your pages in? In Firefox, I'm seeing the content spilling out of the 'blue box' area......

    Nadia


Bookmarks

Posting Permissions

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