dsmflash
August 31st, 2007, 04:11 PM
Need a layer and CSS expert here. Trying to center layers.
I'm brand spanking new to layers and CSS. I'm designing a site where each page has a large image as the background, and the image is different for each page. Naturally, I do not want to slice around everything and break up the image. In Dreamweaver, I want to set the large image as background and then lay the other components (logo, nav bar, etc.) on top of it with layers.
I read the Kirupa tutorial on "Centering Content" and it sounded easy, but its not.
Where does this code go in relation to the head and body? When I tried it, the code actually showed up as text on my page in the browswer. Do I just actually create a new CSS rule and apply it to all the layers I want centered?
/* external CSS */ div#container{ margin: 0 auto; width: 550px; } <!-- (X)HTML code --> <div id="container"> <p>this is centered!</p> </div> Please help and thank you in advance for any replies.:}
I'm brand spanking new to layers and CSS. I'm designing a site where each page has a large image as the background, and the image is different for each page. Naturally, I do not want to slice around everything and break up the image. In Dreamweaver, I want to set the large image as background and then lay the other components (logo, nav bar, etc.) on top of it with layers.
I read the Kirupa tutorial on "Centering Content" and it sounded easy, but its not.
Where does this code go in relation to the head and body? When I tried it, the code actually showed up as text on my page in the browswer. Do I just actually create a new CSS rule and apply it to all the layers I want centered?
/* external CSS */ div#container{ margin: 0 auto; width: 550px; } <!-- (X)HTML code --> <div id="container"> <p>this is centered!</p> </div> Please help and thank you in advance for any replies.:}