Photoshop generated CSS code
Posted: Tue, 2008-07-15 15:36
Hi:
i m a basically a designer but has recently started playing with CSS. I will b obliged if some1 can help me with a CSS, i want 2 keep my generated design code in centre of browser. I have done it for 1024 width and keep it the design in centre for 1280 width. I m posting the code and will b glad if some expert can help me out where i should add the code for bringing it in centre and what code?..thx in advance for ur help and expertese.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Welcome to riz</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
div.Table_01 {
position:absolute;
left:0px;
top:0px;
width:1024px;
height:1650px;
}
div.riz-1_ {
position:absolute;
left:0px;
top:0px;
width:1024px;
height:6px;
background-color: #D0D0D0;
}
div.riz-2_ {
position:absolute;
left:0px;
top:6px;
width:703px;
height:26px;
}
</style>
</head>
<body style="background-color:#7f74aa;">
<div class="Table_01">
<div class="riz-1_">
<img id="riz_1" src="images/riz_1.gif" width="1024" height="6" alt="" /> </div>
<div class="riz-2_">
<img id="riz_2" src="images/riz_2.gif" width="703" height="26" alt="" />
</div>
<div class="riz-3_">
<img id="riz_3" src="images/riz_3.jpg" width="1" height="79" alt="" />
</div>
</div>
</body>
</html>


newbie
Posts: 5
Joined: 2008-07-15
Location: UK
I'm new to CSS as well as
Posted: Tue, 2008-07-15 17:24
I'm new to CSS as well as I've been sticking to design until now. But I THINK you need to use:
margin:0px auto;
Which will center it.
You might need to use text align center in the HTML for IE.
Elder
Posts: 1653
Joined: 2005-11-20
Location: STL
Just change. div.Table_01
Posted: Tue, 2008-07-15 21:04
Just change.
div.Table_01 { position:relative; display: block; margin: 0 auto; width:1024px; }all. <Dictionary.com http://dictionary.reference.com/browse/all>
Moderator
Posts: 9203
Joined: 2004-06-30
Location: Milton Keynes
Then consider ditching
Posted: Thu, 2008-07-24 12:20
Then consider ditching photoshop and coding yourself, as it's spitting out hideous code