Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Junior Member alanmartin's Avatar
    Join Date
    Jan 2009
    Location
    Lincoln England, UK
    Posts
    19
    Member #
    18201
    Liked
    1 times
    Hi everyone, cannot move the lower image to align next to the top one, I do apologise if this is well noobish but it is a long time since I have done a website....
    Here is my HTML :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <title>Tatgirls</title>
    </head>

    <body>
    <div id="container">
    <div id="headerleft"><img src="images/headerleft.jpg" width="488" height="85" alt="Tatgirls Header" /></div>
    <div id="headerright"><img src="images/headerright.jpg" width="492" height="85" alt="Tatgirls Header" /></div>

    </div>

    </body>

    </html>

    Here is my CSS :

    body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: normal;
    color: #000;
    background-image: url(images/pattern.jpg);
    background-repeat: repeat;
    margin-top: 0px;
    }
    #container {
    background-image: url(images/pattern.jpg);
    background-repeat: repeat;
    width: 1000px;
    margin-top: 0px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    height: 1000px;
    }
    #container #headerleft{
    height: 85px;
    width: 488px;
    top: 0px;
    left: 10px;
    }
    #container #headerright {
    height: 85px;
    width: 492px;
    }
    Attached Images Attached Images

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    For #headerleft, add a float: left;
    For #headerright, add a float: right;

    AFTER your headerright div, be sure to clear your floats.

    You should be good to go from there.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member alanmartin's Avatar
    Join Date
    Jan 2009
    Location
    Lincoln England, UK
    Posts
    19
    Member #
    18201
    Liked
    1 times
    Thank you very much, my problem now is when I put the header on and it fits correctly, I cannot put my logo on top of it it just sits below and I cant move it......is ther a good tut that you know of that will help me with layout and how to effect it best....again, Thank you.

  5. #4
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,485
    Member #
    425
    Liked
    2783 times
    Put the logo before the two header divs and you should be fine. Mind you, it's hard to know whether or not that will work without knowing exactly what you're trying to accomplish. Your explanation is a little vague and the logo wasn't there the first time.

    As far as a tutorial...I don't know of one. The best tutorial is trial, error and learning. You might find tuts that will teach you bits and pieces, but nothing for the whole concept of a layout.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  6. #5
    Member
    Join Date
    Jun 2012
    Location
    Posts
    33
    Member #
    31990
    Liked
    3 times
    I would also change all this :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    to

    <!DOCTYPE HTML>
    <html lang="en">
    <head>
    <meta charset="UTF-8">

    reason:

    1. you are using HTML, not XML
    2. you are using HTML, not XHTML
    3. you are not following "strict" guidlines
    4. It will help all browsers parse your code better!

    Here is a GREAT tutorial on floating objects and how to control them!
    http://css.maxdesign.com.au/floatutorial/

    an OK tut on positioning:
    http://www.barelyfitz.com/screencast...s/positioning/

    always look here for any help!
    http://www.w3schools.com/Css/css_positioning.asp

    Also, since you are learning to code... learn HTML5....

    so change <div id="headerright"> and <div id="headerleft">
    to <header id=right><header id=left>


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:18 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com