List Info

Thread: Problem displaying background image in a div using themes.




Problem displaying background image in a div using themes.
country flaguser name
United States
1969-12-31 18:00:00

I'm trying to display a background image in a div I'm using as a
header.
I'm using Themes in Visual Studio and have a themes folder with an
img folder inside that containing the image. In web.config I have
told it to use this theme.
I can change fonts, background color, etc in the stylesheet (inside
the theme folder) but cannot make the image display.

If I don't use themes and use a stylesheet in the root folder with
the background-image property still pointing to the image in the
Themes folder, it works.

Here is my code:

<body&gt;
<form id="form1" runat=&quot;server&quot;>
<div>;
<div class=&quot;bannerbox">
<h5>2020 South Park Drive</h5><br />
<h5>Reidsville, NC 27320</h5>
<img alt="Reidsville Christain Church&quot;
src=&quot;images/churchbuilding.jpg&quot; />
</div&gt;
<asp:contentplaceholder id="ContentPlaceHolder1&quot;
runat=&quot;server">
</asp:contentplaceholder>
</div&gt;
</form&gt;
</body>

Here is the css:

body
{
margin: 0 auto;
text-align: center;
font-family: Verdana;
}

.bannerbox
{
background-image: url
(App_Themes/Maroon/img/bannerboxmaroon.gif);
width: 850px;
top:2%;
}

.bannerbox h5
{
float: left;
left: 5%;
position: relative;
top: 60%;
}
.bannerbox img
{
float:right;
margin-right:2%;
}

Here is a link to what the page looks like:
[URL=&quot;http://www.cooltoneamps.com&quot;]http://www.cooltoneamps.com[/URL]

__._,_.___
.

__,_._,___
Re: Problem displaying background image in a div using themes.
country flaguser name
United States
2007-03-23 10:26:50

change the css to

.bannerbox
{
background-image: url
(img/bannerboxmaroon.gif);
width: 850px;
top:2%;
}

On 22 Mar 2007 09:47:44 -0700, rutledj < jrutledge%40triad.rr.com">jrutledgetriad.rr.com> wrote:
&gt;
> I'm trying to display a background image in a div I'm using as a
> header.
> I'm using Themes in Visual Studio and have a themes folder with an
> img folder inside that containing the image. In web.config I have
>; told it to use this theme.
&gt; I can change fonts, background color, etc in the stylesheet (inside
> the theme folder) but cannot make the image display.
>
>; If I don't use themes and use a stylesheet in the root folder with
>; the background-image property still pointing to the image in the
> Themes folder, it works.
&gt;
> Here is my code:
&gt;
> <body&gt;
> <form id="form1" runat=&quot;server&quot;>
> <div>;
> <div class=&quot;bannerbox">
> <h5>2020 South Park Drive</h5><br />
&gt; <h5>Reidsville, NC 27320</h5>
&gt; <img alt="Reidsville Christain Church&quot;
> src="images/churchbuilding.jpg" />
&gt; </div&gt;
> <asp:contentplaceholder id="ContentPlaceHolder1&quot;
> runat=&quot;server&quot;>
> </asp:contentplaceholder>
> </div&gt;
> </form&gt;
> </body&gt;
>
> Here is the css:
>;
> body
>; {
> margin: 0 auto;
&gt; text-align: center;
> font-family: Verdana;
> }
>
> .bannerbox
> {
> background-image: url
> (App_Themes/Maroon/img/bannerboxmaroon.gif);
> width: 850px;
&gt; top:2%;
> }
>
> .bannerbox h5
> {
> float: left;
&gt; left: 5%;
> position: relative;
> top: 60%;
>; }
> .bannerbox img
> {
> float:right;
> margin-right:2%;
&gt; }
>
> Here is a link to what the page looks like:
&gt; [URL=";http://www.cooltoneamps.com&quot;]http://www.cooltoneamps.com[/URL]
>
>
>

--
Dean Fiala
Very Practical Software, Inc
Now with Blogging...
http://www.vpsw.com/blogbaby
Microsoft MVP

[Non-text portions of this message have been removed]

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )