Dreamweaver CSS (Full Version)

All Forums >> [Web Development] >> Dreamweaver Help



Message


maydayza -> Dreamweaver CSS (3/15/2007 3:37:59)

Hi!

I am new to the whole CSS thing, and need to get this site out. The problem I am having is with a background image in Dreamweaver MX. I need a background colour, with an image as the background on top of that. The image is a fixed size, and don't want it tiled. I understand the only way you can do this is with a stylesheet. So I go and do all the settings and everything, and the background image and colour only shows as a thin strip along the top of the screen when i preview. Can anyone help?

Thanks in advance!




jaybee -> RE: Dreamweaver CSS (3/15/2007 3:55:25)

Need a URL please.




maydayza -> RE: Dreamweaver CSS (3/15/2007 4:07:27)

Hey Jaybee!

The url is http://www.turbogade.co.za/index2.html




maydayza -> RE: Dreamweaver CSS (3/15/2007 4:15:16)

And... here is the text of the css in case you need to see that too




Tailslide -> RE: Dreamweaver CSS (3/15/2007 6:35:37)

It's behaving perfectly normally. The reason you only get a thin strip of background is because because the paragraph that it is "behind" is only one line deep. If you put more content in the paragraph then you'll get more background image showing.

If you want the image to show completely then you need to do something different. You need to either put it on the body element (and change where you've got repeat-y to no-repeat) or put it on a div into which you put the content and give that div a min-height so that it can't get shorter than a certain height (presumably the height of the image). Problem with that approach is that IE doesn't understand min-height so you've got to tweak it to understand it (google IE + min-height).

Another problem is that the content could grow larger than the height of the image so you'll have the background colour showing - not sure if that is an issue.

You could give the div a fixed height but that would be a bad idea as your layout will break if the content grows too long or if the text size is increased by the viewer.

So basically - if you want the image showing once and you don't have another main background image to worry about - stick it on the body element in the stylesheet.





maydayza -> RE: Dreamweaver CSS (3/15/2007 7:15:19)

Thanks for all your help tailside! And yeah, I suppose it is behaving perfectly normally lol. I didn't think of it that way...





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875