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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    css alignment issues - help needed

    Hi, I'm having some layout issues with my site and I'm hoping someone would be kind enough to point me in the right direction for fixing the HTML/CSS.

    My website (redesign) is here:

    http://www.motionphi.com/redesign

    It's a pretty simple layout with a header, main content, and footer all within a container div. the container div is wrapped in another div to get a drop shadow effect.

    The site looks fine in Firefox on Mac. On Safari, Chrome and Opera it is severely broken.

    I was all behaving nicely until I introduced floats to the header section. I believe I need to use floats to properly have a two column layout in the header (logo on the left, graphic text and links on the right), but if there is another way to code this I'd like to know.

    This is a link to the way it is supposed to look:

    http://www.motionphi.com/redesign/site_redesign.jpg

    Thanks in advance, any help is greatly appreciated!

    DS

  • #2
    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 motionphi,
    Floats need a width supplied to work. Otherwise they don't know how much room they are supposed to occupy and how much to leave for something else.


    Try making these changes to your CSS -
    Code:
    .oneColFixed #headertext {
    	/*float: right; must have a width to float*/
    margin: 0 0 0 240px; /*with #headerlogo floated this element can just be margined over*/
    	text-align: left;
    	padding: 0;
    }
    .oneColFixed #footer p {
    	margin: 0;
    	padding: 5px 5px 5px 5px;
      	font:65%/1.4em "Trebuchet MS",Trebuchet,Arial,Verdana,Sans-serif;
      	text-transform:uppercase;
      	letter-spacing:.2em;
    clear: both;
    }
    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


  •  

    Posting Permissions

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