Jump to content

Recommended Posts

Posted
I am making a website called http:\\Browser choice however my page seems to been on the right or left hand side of the page. Anyone got any ideas how to fix this?
  • 11 months later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Hi Xillius,

 

Right i realise this thread is way out of date, however it way come in handy for others.

 

Example: Your html page.

 

Doc type etc.

<Html>

<title> Your page name</title>

<body>

<div id="container"> <!-- some designers call it wrapper all content of your page goes between this div. -->

 

<div id="head"> <!-- for your page heading could be picture or just text or both.

 

etc etc.

 

 

 

</div> <!-- end of head section-->

 

</div> <!-- end of container div. -->

</body>

</html>

save page as yourPage.html.

CSS code. in new page

 

Example of centering div.

* {margin:0px; //this wild card selector stops white space at top browser.

padding:0px; }

 

#container {

width:900px;

height:900px;

border:1px solid #000000; //black border all around the edge.

margin:5px auto; // 5px in from left & right of browser auto centers it top and bottom of page.

}

 

#Head {

{ position:absolute; //sets the head in the container 90px from top of page and sets colour

width:900px;

height:90px;

background-color:#b4eeb4;

or u could set a background-image:url (yourpicture.jpg); // check your picture size is same or smaller than

Posted

From stormingnorm.

 

Sorry but there was alot more code which i completed and clicked save changes at bottom of page.

 

but the whole page of code has not appeared and it took a little while to completed.

 

Sorry it looks like you have only got half the story and did not get the answer to your ? which was further down the page

 

My applogies for incomplete tutorial.:ohwell:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...