PDA

View Full Version : css newbie


designingdani
08-16-2007, 06:48 AM
i posted last night to get help with this website (http://peopleneedgod.com/) for my displaced buttons i had positioned using a table, after which i came to the conclusion that i need to learn css and do this site the right way. i have spent most of the day trying to do just that and am having a hard time wrapping my mind around it so let me use this as a disclaimer to a novice question: i have been researching in books, on the web and walking thru tutorials.

that said, i have a very basic page (see above link, and yes it's still in a table): a background image and 3 rollover images. how do i position these roll-over images in such a way that they don't depart from the background image when the browser window is resized using css? is this possible to do while keeping everything centered on the page?

also, i'm using cs3.

domedia
08-16-2007, 03:27 PM
Yes, it's possible.
The main DIV which is centered and constrained in width, need to have this CSS:
position: relative;

Now you can absolutely position the elements inside it with:
position: absolute;

designingdani
08-16-2007, 09:25 PM
i tried that and i can't seem to prevent the elements inside the div from taking on the position of the container div. (example when i set the outside div to relative, all divs inside of it take on relative positioning and visa versa).

i'm using the insert>layout objects>div tag to create divs, correct? i'm still kinda shooting around in the dark here as most of the books i'm reading show you how to apply styles to divs and text but not divs within divs.

domedia
08-17-2007, 02:46 PM
You need to set all the nested inside divs to position absolute.
If you don't have much experience with CSS based designs have a look at these articles and tutorials:
http://www.adobe.com/devnet/dreamweaver/css.html
They're pretty good, and once you get the basics down, you'll be making CSS designs like it was second nature 8)