473,770 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

specifying different background-image to the default in 'body'

Hi,
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the style
sheet? Without having other attributes stated in body being forgotten
by browsers.
Do I have to link that page to a separate but nearly identical css
sheet just for itself with only that 'background' difference?

Thanks in advance,
Dave
Jul 21 '05 #1
2 4416
Dave wrote:
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the
style sheet? Without having other attributes stated in body being
forgotten by browsers. Do I have to link that page to a separate
but nearly identical css sheet just for itself with only that
'background' difference?


No separate sheet needed. Just add this in the <head> section, after
the link to the stylesheet.

<style type="text/css">
body { background-image: url("path/to/image.gif") }
</style>

...or whatever else you want to override from the external file.

--
-bts
-This space intentionally left blank.
Jul 21 '05 #2
Dave wrote:
if I have a body colour (white) specified in an external css sheet,
what should I do in an individual webpage that is to have a
background-image, i.e. override the attribute 'white' set in the style
sheet? Without having other attributes stated in body being forgotten
by browsers.
Do I have to link that page to a separate but nearly identical css
sheet just for itself with only that 'background' difference?


Either put a class on the body element and include the separate styling
in the main CSS file, or include inline styling after the link to the
external sheet.

If you only specify the background-color, all of the other properties
will cascade through.

--
Mark.
http://tranchant.plus.com/
Jul 21 '05 #3

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

Similar topics

1
1681
by: rs035 | last post by:
good morning, everybody i know, it seems more to be a problem according to unix but i got it while developing software with php: i have 2 different users on a hp-ux machine that execute php scripts. they are both in the same group. these php scripts start background processes, i can communicate with using signals (sending with posix_kill, starting background processes via pcntl_fork). so i got severel background processes owned by my 2...
1
29894
by: rsd | last post by:
how do you specify the "colspan" attribut of a <td> cell when building the table/rows/cells dynamicly? ie: lets say we have the follwoing code: table = document.all; // header row tr1 = table.insertRow(); td1 = tr1.insertCell(); td1.innerHTML = "this is the header row";
2
2493
by: Lois | last post by:
My website formatting knowledge is mostly HTML; I know hardly any Javascript. Recently I created a site with a nav bar in table format across the top of the page, and I made the background colour of the cell with the name of the page that the reader was on a different shade, like this: Home | This | That | Other | Etc. If you were on "Other" page, for example, the background colour of the "Other" cell was a different shade from the...
3
1368
by: Marcio Caetano | last post by:
Hello ! Consider the examples bellow: 1- I create a table named TBA with columns ( A int , B char(10) ) 2- I create an B-Tree index named IDXA using the column A 3- I create an GIST (or other) index named IDXB using the column A So, I ask you:
11
4081
by: David Stone | last post by:
I'm trying to figure out how to avoid tables when presenting a sidebar on an html 4 strict page, by using div instead. I've run into a situation where I get different rendering of the elements within the main div, depending on whether it is contained within a <td> or a <div> - http://www.chem.utoronto.ca/~dstone/test1.html http://www.chem.utoronto.ca/~dstone/test2.html I've been trying to understand why, particularly, the <ul>
2
1660
by: viveklinux | last post by:
Hi, Have a FAQ page , where have many sets of questions and answers. The questions need to be a different colour / style and the answers different. Was wondering is there a easy way to do this as compared to enclosing each question and answer within divs ? Perhaps , through JavaScript. Thanks in advance ..
7
2841
by: Tristán White | last post by:
Hi there, this'll be an easy one I'm sure. I have a small question that will take a second to answer, I am sure. If you go to http://snipurl.com/t821 All the buttons on the left are red, and when the mouse hovers over them, they go green. How do I make it so that the buttons stay on green (or indeed any other colour) after being selected? So that the visitor knows which page he or she
2
2525
by: PeterW | last post by:
Hi everybody, I know this issue has already been posted by others and I viewed all the threads dealing with it, but I still couldn't find the whole answer to my problem. So here we go: I have a continuous form named frmEmployees, which has 4 controls: EmployeeNumber, EmployeeName, EmployeeType and Dept. The form is sorted alphabetically and there are 3 employee types. What I need is to have a different background color for each employee...
53
5268
by: Jonas Smithson | last post by:
In his book "CSS: The Definitive Guide" 2nd edition (pgs. 116-117), Eric Meyer has an interesting discussion about "font-size-adjust" that was evidently dropped in CSS 2.1 due to browser non-support. I'm wondering if there's some way I could still get a primitive version of this functionality, because different fonts display at very different optical sizes for the same nominal sizes. For example, suppose I want type to display in...
10
1236
by: Geoff Cox | last post by:
Hello, Can anyone tell me why these 2 sets of code give different results? for (J in Next) { <action> } <function>
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10102
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8933
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.