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
    Jan 2013
    Posts
    6
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Scrolling and Image problem

    Hello all,

    I am making a website (exogenese.altervista.org)and I have got 2 problems:

    1) As you can see the picture on the index page is far to big, and it doesn't auto re-size, any ideas?

    2) I have to scroll right when I am on my main pages, when I would like the text to be in the center of the page...

    Any help would be appreciated, thanks in advance, Ben
    Last edited by vinyl-junkie; 01-29-2013 at 04:14 AM. Reason: Edited so the URL would show up in the post

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,180
    Thanks
    23
    Thanked 602 Times in 601 Posts
    This is for problem 1)
    You can reposition the container div to suite your tastes. You should have a doctype in all pages. Your image has a slight border that should be removed:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <title>index</title>
    <base href="http://exogenese.altervista.org">
    <style>
    body
    {
    	margin: 0px;
    	padding: 0px;
    //JUST TO SHOW YOU WHERE THINGS ARE REMOVE COMMENTS FOR FINAL
    	//background-color: #000;
    }
    #container
    {
    	position:relative;
    	width: 960px;
    	margin: auto;
    }
    #lang
    {
    	position:absolute;
    	top: 250px;
    	left: 730px;
    }
    </style>
    </head>
    
    <body>
    <div id="container" >
    <img src="images/bg0.jpg" width="960px"><!--  THE SAME AS YOUR CONTAINER WIDTH   -->
    
    <div id="lang">
    <img src="images/fr.gif" alt="drapeau 1" width=200px height=100px><br>
    <img src="images/uk.jpg" alt="drapeau 2" width=200px height=100px>
    </div>
    </div>
    </body>
    </html>
    For problem 2: set the width to something smaller in the css file:
    Code:
    .c {
      width: 1500px ;  // TRY 960PX AND GO FROM THERE
      margin-left: auto ;
      margin-right: auto ;
    }
    Last edited by sunfighter; 01-29-2013 at 04:49 PM.

  • Users who have thanked sunfighter for this post:

    benjbear (02-02-2013)


  •  

    Posting Permissions

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