Forum Moderators: not2easy
<h1><img src="*image*" alt="*image_name*" class="image_resize" /></h1> <p><img class="image_resize" src="URI to image" alt="Text Description" title="Mouseover Text Description" /></p> #home_lay {
width: 139px;
height: 115px;
margin: 0 auto;
}
.image_resize {
width: 139px;
height: 115px;
border: 0;
}
<div id"home_page">
<div id"home_lay">
<p><img class="image_resize" src="URI to image" alt="Text Description" title="Mouseover Text Description" /></p>
<ul>
<li><a href="*url*">home</a></li>
<li><a href="*url*">news</a></li>
<li>preview</li>
<li>shop</li>
<li>contact us</li>
</ul>
</div>
</div> Well when you say centre the list - do you want to centre the div or the text of the list?
You could try margin: 0px auto
In order to center the entire list, you must put the unordered list inside a div and set a width and height. Or, at least a width less than 100% to center. THEN, you can style the div with margin: 0 auto;
NEVER put images between heading tags. It works but is NOT sematic coding for search engines. Some browsers may hic-cup at it depending on the document type used which seems to be XHTML 1.0 in your case.
Are the "asterisks" (*) in this code a typo? <h1><img src="*image*" alt="*image_name*" class="image_resize" /></h1>
Try: <p><img class="image_resize" src="URI to image" alt="Text Description" title="Mouseover Text Description" /></p>
CSS:
#home_lay {
width: 139px;
height: 115px;
margin: 0 auto;
}
.image_resize {
width: 139px;
height: 115px;
border: 0;
}
You may have to tweak the div sizes to fit the image and list.
HTML:
<div id"home_page">
<div id"home_lay">
<p><img class="image_resize" src="URI to image" alt="Text Description" title="Mouseover Text Description" /></p>
<ul>
<li><a href="*url*">home</a></li>
<li><a href="*url*">news</a></li>
<li>preview</li>
<li>shop</li>
<li>contact us</li>
</ul>
</div>
</div>
Ron
#home_page ul li {
text-align: center;
} <div id="home_page">
<div id="home_lay">
p#i_mg {
text-align: center;
} <p id="i_mg"><img class="image_resize" src="URI to image" alt="Text Description" title="Mouseover Text Description"></p>