Jump to content

Centred Div


Dysan

Recommended Posts

Hi, Using the following HTML & CSS code, is it possible to vertically and horizontally align the container div?

 

HTML

 

<!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">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="index.css" />
</head>

<body>
<div id="container">

</div>
</body>
</html>

 

CSS

 

*
{
  FONT-SIZE: 8pt;
  FONT-FAMILY: Verdana;
}

body
{
  MARGIN: 0px auto;
  BACKGROUND: url(BG.bmp) no-repeat;
}

#container
{
  WIDTH: 733px;
  BORDER: 1px solid rgb(0,0,0);
}

Link to comment
https://forums.phpfreaks.com/topic/86936-centred-div/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.