<DIV> color

  • Thread starter Thread starter frontpage
  • Start date Start date
F

frontpage

I have this tag in my site
<div style="position: absolute; width: 800px; height: 20px; z-index: 3;
left:-2px; top:127px" id="bluebar">
</div>
Is it possible to assign a background color to this? I have tried
backgroud-color in several places with no luck. I am new to the <DIV> tag, i
have always used tables so am not sure if i can even do it.
Or, after writing that do i need to put a 1 cell table in it and
background-color it?
thanks,
Jeff
 
Yes - you can do that in two ways, inline and in a stylesheet.

Either way, you would use the style -

background:blue;

so your inline code would be -

<div style="position: absolute; width: 800px; height: 20px; z-index: 3;
left:-2px; top:127px; background-color:blue;" id="bluebar">

and your stylesheet code would be -

#bluebar { background-color:blue; }

(obviously you would replace the color name 'blue' with whichever color you
want, and with hex or RGB values, as desired)
 
In layer properties, select Borders and Shading on the shading tab
select the wanted background color.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.

-----Original Message-----
From: frontpage [mailto:[email protected]]
Posted At: 27. juli 2004 05:06
Posted To: microsoft.public.frontpage.client
Conversation: <DIV> color
Subject: <DIV> color


I have this tag in my site
<div style="position: absolute; width: 800px; height: 20px; z-index:
3; left:-2px; top:127px" id="bluebar"> </div> Is it possible to assign a
background color to this? I have tried backgroud-color in several places
with no luck. I am new to the <DIV> tag, i have always used tables so am
not sure if i can even do it.
Or, after writing that do i need to put a 1 cell table in it and
background-color it?
thanks,
Jeff
 
Back
Top