Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2006, 08:32 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS and ASP.net conflict

Hi everyone,
            I'm an avid fan of CSS layers. I created a website using this method. On transporting the site in to ASP.net 2.0 using beginning asp.net 2.0 and VWD as descriebd in the book i've had trouble with the CSS.
    I have a css aligned div layer which i intend on using as my main content placeholder. i intend to use a background image that is fixed and doesn't repeat. i.e there is one copy of the picture in the top left hand of the layer that won't scroll. unfortunately, for some reason when applying this to the specific div tag, it places the images as if it was to be the bacground image for the body, placing the image in the top left corner of the page, and because it's set to that div layer only the piece of the image that overlaps the layer shows up. I don't understand why the code should mean that it
    It works as a html file (no ASP) and the image is in the right place if i set it to "scroll" using VWD. just not when be "fixed".
    Officially stumped.. Would be mega greatful for any help at all!

here's the css code for the div.

div.maincont{
position:relative;
top:-30px;
Background-color:#000000;
background-image:url("images/speaker.gif");
background-repeat: no-repeat;
background-attachment:fixed;
width:86.4%;
height:500px;
text-align:left;
z-index:2;
margin:0 auto;
overflow-y:auto;
}


EDIT:
this is a mozilla firefox problem. any ideas?
works fine in IE
 
Old June 1st, 2006, 07:52 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I've had the same problem... the only way that I can get it to work is to include the ENTIRE url to the image. Hope that helps.

 
Old June 1st, 2006, 07:55 AM
Registered User
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Figured it out, well kinda. Take it out of your CSS and specify it in the DIV ...

<div class="rightFade" style="background-image: url(Images/gradientGraphic.jpg)">
        Something
</div>






Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS anomolies in ASP.NET David_0223 ASP.NET 2.0 Basics 1 March 27th, 2008 03:06 PM
CSS for XML in ASP.NET toddw607 CSS Cascading Style Sheets 1 July 19th, 2007 01:34 PM
CSS for XML in ASP.NET toddw607 ASP.NET 2.0 Basics 3 June 19th, 2007 09:29 AM
IIS and ASP.NET Development Server conflict ASPNewbie2 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 December 28th, 2006 08:23 AM
Styles.CSS in ASP.NET rajen CSS Cascading Style Sheets 2 July 22nd, 2005 04:54 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.