1 reply [Last post]
Ronaldo.K
Ronaldo.K's picture
Offline
newbie
Last seen: 10 years 6 weeks ago
Timezone: GMT+9
Joined: 2012-07-30
Posts: 3
Points: 5

I have a problem with aligning images in div which is floated to left.
in the code below how to align "logo.jpg" to center vertically and horizentally?
Thank you.

<!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>
<meta http-equiv="Content-Type" />
<title>layout</title>
<style type="text/css">
 
body,div,ul,li,dl,dt,dd,ol,p,h1,h2,h3,h4,h5,h6,form {font-size:11px; margin:0;padding:0;line-height: 150%;}
ul,ol,dl {list-style:none}
img {border:0;vertical-align:top;}
ul {list-style:none; padding:0; margin:0;}
 
 
#_layout {margin:0 auto; width:980px;}
#_top_cntr {width:980px; height:150px; background:#fff; margin-bottom:10px;}
 
/* top_cntr */
#_brand {height:110px; background:url(images/top_bg.jpg);}
 
#_left_logo {width:280px; height:110px; float:left; padding-left:10px;}
#_right_logo {width:680px; height:110px; float:right; margin-left:10px;}
 
</style>
</head>
<body>
<div id="_layout">
   <div id="_top_cntr">
       <div id="_brand">
       		<div id="_left_logo">
            	<img src="images/logo.jpg"/>
            </div>
            <div id="_right_logo">
            </div>
       </div>
     </div>
</div>
</body>
</html>

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi Ronaldo.K, These how to