|
Posted by Vince Morgan on 11/16/06 08:14
"Vince Morgan" <vinhar@REMOVEoptusnet.com.au> wrote in message
news:455c0ed8$0$5105$afc38c87@news.optusnet.com.au...
> Hi All,
> I have been trying to centre an image horizontaly (external
css)
> within a <div>, without setting explicit XY values, but cannot get it to
> work in either IE6 or the latest Mozilla.
> This may not be the correct forum for this, but I had hoped that, as it is
> very active here, someone may have an answer :)
> I've been googling around half the day and I'm getting nowhere. If it has
> to be an inline style then I'm happy enough to do that.
> TIA,
> Vince Morgan
>
>
I would love to show the URL but I'm working in an IDE on localhost.
The <div> is the second last one, which goes to the right of the page.
<style type="text/css">
body {
background: #FFF;
color: #000;
width: 795px;
font-size: 100%;
}
div#right, div#left {/*relate the two divs*/
display: inline;
float: left;
}
div#right {
padding-left: 120px;/
}
label, input.norm, textarea, select.norm {
display: block;
width: 200px;
float: left;
margin-bottom:11px;
font-family: Arial, Georgia, Helvitica, sans-serif;
font-size: .80em;
background: #FFFF99;
}
div label {/* overide the above */
width: 70px;
background: #FFF;
text-align: left;
color: #044;
}
select.norm {
width: 5em;
}
#head {
color: #369;
font-family: Helvitica, Arial, sans-serif;
font-weight: Bold;
font-size: 1em;
}
input#submit {
position: relative;
left: 71px;
}
img#img_1 {
border: thin solid #666
}
..centre {
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
br {
clear: left;
}
hr {
width: 85%;
height: 1px;
border: #044;
background-color:#044;
color: #044;
}
..foot {
background-color:#FFF;
color:#666;
font-family:Arial, Georgia, sans-serif;
font-size:10px;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="head">Catalogue request
<p> </p>
</div>
<div id="left">
<form method="post" action="PlannerMail.PHP" name="entry" onSubmit="return
checkSubmit();">
<div><label id="lab_1" for="inp_1">Name:</label><input class="norm"
name="name" id="inp_1"/><br></div>
<div><label id="lab_2" for="inp_2">Company:</label><input class="norm"
name="comp" id="inp_2"/><br></div>
<div><label id="lab_3" for="inp_3">Address:</label>
<textarea name="addr" cols="20" rows="2" id="inp_3"></textarea><br></div>
<div><label id="lab_4" for="inp_4">Suburb:</label><input class="norm"
name="sub" id="inp_4"/><br></div>
<div><label id="lab_5" for="inp_5">Postcode:</label><input class="norm"
name="post" id="inp_5"/><br></div>
<div><label id="lab_6" for="inp_6">State:</label><select class="norm"
name="state" id="inp_6">
<option value="ACT">ACT</option>
<option value="NSW">NSW</option>
<option value="NT">NT </option>
<option value="QLD">QLD</option>
<option value="SA">SA </option>
<option value="TAS">TAS</option>
<option value="VIC">VIC</option>
<option value="N/A">N/A</option>
</select><br></div>
<div><label id="lab_7" for="inp_7"> Email:</label><input class="norm"
name="email" id="inp_7"/><br></div>
<div><input id="submit" type="submit" value=" Submit "></div>
</form>
</div>
<div class="centre" id="right"><img id="img_1" src="images/CopeLrg.jpg"
alt="Cope.jpg" /></div>
<div class="foot centre">
<br> <br> <br>
<hr>
<span>All contents copyright © 2006 - Powered by Capsol Webexpress</span>
</div>
</div>
</body>
</html>
Sorry about the size of this post, but I couldn't see much I could leave out
without breaking it all.
Vince
[Back to original message]
|