View Full Version : HTML help again
Working with CSS and I need help.
I have a .css file that links to every page.
I have 3 frames in my index. I want each frame to always display a certain background, even after clicking a link to another part of my webpage. I don't want to have to go around doing <body background=> for my 16 pages.
Thanks
SurfMonkey
05-14-03, 05:16 AM
In your CSS set:
BODY {background: url(somepick.gif) black repeat-y}
That will try to load somepick.gif and repeat it over the page if necessary otherwise it will set the back ground to black.
Then all you need to do is include the link to your CSS file in each frame. But why are you using frames anyway? They suck. :D
It still doesn't allow me to have a different pic per frame.
Thanks though.
You will need a different style for each frame body e.g.
BODYA {background: url(somepickAgif) black repeat-y}
BODYB {background: url(somepickBgif) black repeat-y}
BODYC {background: url(somepickCgif) black repeat-y}
Then in frame set the class...
<body class="BODYA"> ....
and in the other frame...
<body class="BODYB"> ...
etc.
If you don't define the class of the body on a page then it will use whatever the generic BODY style from your style sheet.
You can't set rules in your style sheet by file name if thats what you are looking for.
Thanks, now how do I make visited links another colour?
body.bodya
{
visited-link:Red;
}
doesn't work. :(
SurfMonkey
05-14-03, 07:37 AM
I think this should do it:
a:link { text-decoration: none; color: white}
a:visited { text-decoration: none; color: red}
a:hover { text-decoration: none; color: blue}
a:active { text-decoration: none; color: green}
Sort of :D
Thanks guys, works now. :)
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.