CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   Scrolling and Image problem (http://www.codingforums.com/showthread.php?t=286586)

benjbear 01-28-2013 04:26 PM

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

sunfighter 01-29-2013 04:37 PM

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 ;
}



All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.