PDA

View Full Version : CSS Problems


Elite51
03-30-2009, 10:28 PM
I am attempting to use a background image and trying to get it centered. However when I use the tag background-position: center - its causes the background to be enlarged and dreamweaver then cuts off the top and bottom of the image unless I add in tons of <br>. Can anyone check the code and get it set right for me, or tell me what is causing this to happen.

<style type="text/css">
<!--
body {
background-color: #000;
background-image: url(http://img4.imageshack.us/img4/203/layoutwhite.jpg);
background-position: center;
background-repeat: no-repeat;
}
-->
</style>Thanks

domedia
03-31-2009, 01:29 AM
That looks right to me. Can you put it on the web somewhere?

Elite51
03-31-2009, 01:33 AM
I got it fixed :D

BUT! Now I am having an issue trying to position an image exactly where I want (or a certain table) exactly where I want. Can you give me an example of how to make an image position directly under the link buttons just slightly to the left of the design?

edbr
03-31-2009, 02:49 AM
not from the info you give, but basically if position using margins you could probably get what you want

Rob_Che
03-31-2009, 11:56 AM
<style type="text/css">
<!--
body {
background-color: #000;
background-image: url(http://img4.imageshack.us/img4/203/layoutwhite.jpg);
background-position: center;
background-repeat: no-repeat;
}
-->
</style>

Just going back to this - I think ""background-position: top" is what you're after...

Anyway...