Forum Moderators: not2easy

Message Too Old, No Replies

whats wrong with this

         

djmagic

12:13 pm on Feb 21, 2010 (gmt 0)

10+ Year Member



#Layer-13 {
position: absolute;
left: 1px;
top: 500px;
width: 219px;
height: 36px;
z-index: 13;


<div id="Layer-13" >
<a href="santa.html">
<img src="Layer-13.png" width="219" height="36" alt="balloons copy" class="style1" /></a></div>

to be brief i have created a psd file
sliced it into 14 layers
but am unable to center any of it
what code can i apply to the css and html to get all layers centerd..
or do i cnter 1 layer and make allthe others relativ to that layer..
im new at this so please excuse my ignorance

achshar

1:23 pm on Feb 21, 2010 (gmt 0)

10+ Year Member



i couldnt really understand your question... if you want to have the divs centered
use 'margin: 0 auto;'
but without absolute and left....

it will center any non floating, fixed-width element horizontally

how bout something like...


#Layer-13 {
margin: 0 auto;
top: 500px;
width: 219px;
height: 36px;
z-index: 13;

you can you this for every layer... and for vertical center... you can stick to 'top' only..

djmagic

3:46 pm on Feb 21, 2010 (gmt 0)

10+ Year Member



this has helped thankyou
i have now centred the head of my web page
now i need to do the rest.