473,407 Members | 2,314 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,407 software developers and data experts.

Incosistancy with style sheet and html - proper

I am a relative newbee

I am having problems with applying a style on a style sheet.

I have created a div and created a class. In the style sheet file I did the
following:

"div.TopBar {
background: Silver url(Images/BlueBar.jpg) repeat-x;
}"

In the html I did the following:

"<div class="TopBar">
<a href="pages/contactus.htm">Contact Us</a>
</div>"

And I do not get the background bar that is the image. If I do an "inline"
style as below:

"<div class="TopBar" style="background: Silver url(Images/BlueBar.jpg)
repeat-x">
<a href="pages/contactus.htm">Contact Us</a>
</div>"

Then it works. What gives?

If you do not see the html instead you see a a href then please check source
code, as I do not know how to post without html being converted
Jul 24 '06 #1
2 1370
Warren Machanik wrote:
I am a relative newbee
A nephew? 3rd cousin twice removed?
I am having problems with applying a style on a style sheet.

I have created a div and created a class. In the style sheet file I did the
following:
[...]
Please provide and URL to a test case.
(Although I suspect a typo somewhere...)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 24 '06 #2
I figured it out. The problem was the image path.

In the <link href....
I was using a stylesheet in a subdirectory of the root, the image directory
was also off the root, so it did not find it

"Jim Moe" <jm***************@sohnen-moe.comwrote in message
news:gf******************************@giganews.com ...
Warren Machanik wrote:
>I am a relative newbee
A nephew? 3rd cousin twice removed?
>I am having problems with applying a style on a style sheet.

I have created a div and created a class. In the style sheet file I did
the
following:
[...]
Please provide and URL to a test case.
(Although I suspect a typo somewhere...)

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

Jul 26 '06 #3

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

Similar topics

19
by: Roger | last post by:
How can I pass parameters to a style sheet? I have noticed a couple of sites are now passing variables to the style sheet, which appear to be substituted at run time. For example: <link...
1
by: Hank Flowers | last post by:
In trying to load a style sheet via JavaScript I ran into a problem...the style sheet doesn't load. This simple task has turned into a vexing problem. Here is the script and html: <html> <head>...
33
by: amerar | last post by:
Hi All, I can make a page using a style sheet, no problem there. However, if I make an email and send it out to my list, Yahoo & Hotmail totally ignore the style tags. It looks fine in...
1
by: blue | last post by:
My app draws a bunch of tables on the page and has a form for the user to enter data and submit. The form is contained within a User Control called DecisionCtl. When they submit the form, a bunch...
9
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It...
1
by: Warren Machanik | last post by:
I am having problems with applying a style on a style sheet. I have created a div and created a class. In the style sheet file I did the following: div.TopBar { background: Silver...
1
by: abaybas | last post by:
I'm creating a page in which a certain "content" part of the page is refreshed using ajax. I do this by using a div#content, and it's child div#container. the code: ... ...
3
by: =?Utf-8?B?U3ViYQ==?= | last post by:
I am using a asp page to dynamically create a stylesheet my asp page creates the following css element when i call the asp page my typing the url in the browser. My asp page works...
3
JnrJnr
by: JnrJnr | last post by:
I have a StyleSheet.css in my project with no errors (checked by jigsaw.w3.org/css-validator/). When I change a value in my style sheet the page doesnt respond to the change but when I remove the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.