473,383 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

css not applied + lost image

Hello,

Here's a weird one that I can't quite put my finger on, but wonder if anyone
may enlighten me?

My ASP.NET site is all working functionally on site, but for some reason,
none of the images are being shown in the browser when it's running, and
also the style sheet referenced in the html header on each page is not being
applied to the text. So, it works but looks shoddy...

There is nothing wrong with the html - I've taken the code from 'view
source' in browser, made a new .htm page from it in the app directory, and
when I view it, the images are there and the css formatting is as it should
be.

The browser is IE version 6, and the 'show pictures' option is checked so
it't not that that prevents the image from being rendered.

Any ideas / pointers much appreciated.

Ian

ia*@xwebservices.net
Nov 17 '05 #1
6 1892
If you are using
<asp:Image ImageUrl="..." Runat="server"></asp:Image>

make sure you have Runat="server"
"Ian Gordon" <xi*@dircon.co.uk> wrote in message
news:EO*************@news.dircon.co.uk...
Hello,

Here's a weird one that I can't quite put my finger on, but wonder if anyone may enlighten me?

My ASP.NET site is all working functionally on site, but for some reason,
none of the images are being shown in the browser when it's running, and
also the style sheet referenced in the html header on each page is not being applied to the text. So, it works but looks shoddy...

There is nothing wrong with the html - I've taken the code from 'view
source' in browser, made a new .htm page from it in the app directory, and
when I view it, the images are there and the css formatting is as it should be.

The browser is IE version 6, and the 'show pictures' option is checked so
it't not that that prevents the image from being rendered.

Any ideas / pointers much appreciated.

Ian

ia*@xwebservices.net

Nov 17 '05 #2


With regards, Ian
ia*@xwebservices.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #3
Ian,

Did you mean to respond? If so, your response was blank.

John Saunders
jo***********@surfcontrol.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4
oops!

Right, yep, the urls are all correct, and runat="server" is set as
required. Strange.

the CSS file link url is also correct -the web forms and css file are in
same directory, and link is as below:
<LINK href="mycss.css" type="text/css" rel="stylesheet">

Why would this not be applying the relevant css formatting at run-time?
It works fine on 2 other machines I've tested on.

With regards, Ian
ia*@xwebservices.net
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #5
"Ian Gordon" <ia*@xwebservices.net> wrote in message
news:Ot**************@TK2MSFTNGP12.phx.gbl...
oops!

Right, yep, the urls are all correct, and runat="server" is set as
required. Strange.

the CSS file link url is also correct -the web forms and css file are in
same directory, and link is as below:
<LINK href="mycss.css" type="text/css" rel="stylesheet">

Why would this not be applying the relevant css formatting at run-time?
It works fine on 2 other machines I've tested on.


Ok, now that we're pretty sure that the css file is found and valid (though
you might want to throw in some JavaScript to confirm this), you have the
question of why it works differently on different machines. Keep in mind
that the "c" in "css" stands for "Cascading". You may have inherited styles
from another stylesheet interfering with yours. Although "mycss.css" may be
the same on all machines, one of the other stylesheets may not be.

See if you can create a test <div> at the very top of the .aspx file which
uses one of the styles from mycss. If that doesn't work, you'll then have to
track down all the other ways CSS might be giving you something unexpected.
For instance, styles on the <body> tag, other style rules for "div", etc.
--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
Nov 17 '05 #6
Hello Ian,

John is right here. Since the same code behaviors differently in machines,
we'd better compare them first. I suggest you:

1) Create a simplest testing page in that machine to test it could show
image well
2) If yes, check CSS inherited tree to make sure that it is the same as
John suggested.
3) If no, please create a simple page to just contain one image to test if
it could be shown.
4) If still no, my suggest is to reinstall asp.net on your system. It is
very quick. You could refer to http://support.microsoft.com/?id=306005 for
detailed steps.

If the problem still there, please post here. Thanks very much.

Best regards,
Yanhong Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
!From: Ian Gordon <ia*@xwebservices.net>
!References: <uG*************@TK2MSFTNGP09.phx.gbl>
!X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
!Subject: Re: css not applied + lost image
!Mime-Version: 1.0
!Content-Type: text/plain; charset="us-ascii"
!Content-Transfer-Encoding: 7bit
!Message-ID: <Ot**************@TK2MSFTNGP12.phx.gbl>
!Newsgroups: microsoft.public.dotnet.framework.aspnet
!Date: Fri, 08 Aug 2003 11:13:51 -0700
!NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
!Lines: 1
!Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
!Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:166217
!X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
!
!oops!
!
!Right, yep, the urls are all correct, and runat="server" is set as
!required. Strange.
!
!the CSS file link url is also correct -the web forms and css file are in
!same directory, and link is as below:
!<LINK href="mycss.css" type="text/css" rel="stylesheet">
!
!Why would this not be applying the relevant css formatting at run-time?
!It works fine on 2 other machines I've tested on.
!
!With regards, Ian
!ia*@xwebservices.net
!
!
!*** Sent via Developersdex http://www.developersdex.com ***
!Don't just participate in USENET...get rewarded for it!
!

Nov 17 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | | last post by:
hi, is it a php bug or i do smth wrong? From site http://www.allegro.pl/show_user_auctions.php?uid=45432 I`m taking images (those thumbs) and its name at right.
4
by: Richard | last post by:
This simple change to dynamicdrive's textual tooltip does what I want perfectly. (whichcontent) determines which group of thumbs will be shown. My color coded editor is showing me that something...
1
by: Martin Lucas-Smith | last post by:
Tricky one this... Basically I have a link style: a {border: 1px solid gray} but I don't want the border added when a link is applied to an image, i.e. <a href="#"><img src="foo.jpg"></a> ...
2
by: M West | last post by:
hello, currently trying to write a custom control that will display an image in true transparent form, e.g. can actually see the background images placed behind the control rather than the...
1
by: Obantec Support | last post by:
Hi mixed html & css i want to use the following code inside the table tags <td></td> html code <div class="menu-subs"> <div class="menuheader-subs"><h1>:: Subscriber sections</h1></div>
0
by: erickephart | last post by:
I have a login page (Login.aspx) that (after a certain number of failed attempts) displays a captcha. In SignIn.ascx the image is displayed via: '<img src="JpegImage.aspx">'. Here is the...
2
by: emma.sax | last post by:
My script is as follows: function setImageSizes() { var staticHeight = 70; if(!document.getElementsByTagName || !document.images) return false; var thumbnail =...
9
nathj
by: nathj | last post by:
Hi, I am having a spot of bother with the use of $_SESSION. They are gernally working absolutely fine with one exception. On my form I have a capthca security image, when this image is built...
4
by: R.A.M. | last post by:
Hi, I have created ASP.NET application with forms authentication (Login.aspx). The problem is that although Login.aspx contains CSS styles and JPEG/GIF images, usually the styles are not applied...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.