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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    looking good but still not perfect.

    Ok, I got it looking the way I want it however I am afraid those with differing screen resolutions will have troubles. The .head and .banner do fine but the rest gets pushed off the screen when you restore down or view with a lower screen resolution.

    The page

    The CSS

    Work Safe I really should change the name.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Check out this 3 column layout example.

    http://bonrouge.com/3c-hf-fluid.php

    You should avoid absolute positioning whenever possible. In your case its possible. Also you should read the Sticky about doctypes. You are using a partial doctype. Doing so makes some browsers go into quirks mode so it may not display the way you want it to.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello chipperi,
    Try this:
    Code:
    .head {
    	background-color: #666666;
    	text-align: center;
    	height: 100px;
    	margin-top: 0px;
    	border: thin dotted #FF0000;
    }
    .banner {
    	background-color: #666666;
    	text-align: center;
    	height: 100px;
    	margin-top: 10px;
    	border: thin dotted #FF0000;
    }
    .left {
    	border: thin dotted #FF0000;
    	background-color: #666666;
    	text-align: center;
    	height: 1200px;
    	width: 120px;
    position: absolute;
    top: 230px;
    left: 10px;
    }
    .right {
    	background-color: #666666;
    	text-align: center;
    	height: 1200px;
    	width: 120px;
    	border: thin dotted #FF0000;
    position: absolute;
    top: 230px;
    right: 10px;
    }
    .center {
    	background-color: #666666;
    	text-align: center;
    	height: 1200px;
    	border: thin dotted #FF0000;
    	margin: 10px 145px;
    }

    You may not want a transtitional DocType but this is the complete one:
    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    Check the link about DocTypes in my sig for help picking the right one for you.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    chipperi (12-28-2007)

  • #4
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks alot, I am trying to teach my self css so be patient with me.

    I can see you added:
    position: absolute;
    top: 230px;
    right: 10px;
    Ok What is the difference between absolute, relative, and static?

    I am assuming that top:230 is telling it to stay 230px from the top and right:10px is telling it to stay 10px from the right. Thus allowing it to fit and move with any screen?

    Also:
    margin: 10px 145px;
    was added to the .center. how is this interpreted? To my untrained eye I see conflicting instructions. what is being moved 10 and what 145?

    Please remember the for dummies lingo.

    Also if it helps to make better suggestions I am using Dreamweaver MX to build my CSS so is is mostly guessing what different options do.

  • #5
    Regular Coder
    Join Date
    Nov 2006
    Posts
    246
    Thanks
    13
    Thanked 26 Times in 24 Posts
    If you're trying to teach yourself CSS, here's a good place to start with: http://w3schools.com/css/css_examples.asp. There's little examples you can play with.

    Position
    http://www.christian-web-masters.com...l__page_1.html
    That'll explain the differences in the position property. It doesn't really cover the top, left, right and bottom properties though. You're basically right about what they do though. I'm pretty sure they're identical to margin anyway, so I never use top, left, right, and bottom.

    Margin
    With margins, when you only see 2 numbers like margin: 10px 145px;, the first number represents both top and bottom, and the second number represents both left and right. So margin: 10px 145px; is just a way of simplifying margin: 10px 145px 10px 145px;.
    Last edited by Majoracle; 12-29-2007 at 01:47 AM.


  •  

    Posting Permissions

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