Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

CSS question


ghost's Avatar
0 0

Hey whats up everyone. I'm relatively new to the whole css thing and I have a couple questions about it.

First, I'm trying to make a div with a white background opaque by using: filter:alpha(opacity=60); opacity:0.6; It works, but it also makes everything else in the div opaque. How would I keep the font, inputs, or anything else that I may have in that div from becoming opaque? So basically the only thing I want opaque is the background color…not anything else in the div. I though that maybe this would fix it: .opaque { background-color:white; filter:alpha(opacity=60); opacity:0.6; } .another_div_inside_the_opaque_div { filter:alpha(opacity=100); opacity:1; } but it didn't work. Any ideas?

Last thing- I was looking at the source of the main page for hbh and I saw that tables were used to make the Navigation, Main Area, and Login columns. I basically want to do the same thing, but by using divs.

I set divs left and right fixed to 200 pixels, but I want to set the center div with a percentage so that it will resize accordingly to the viewer's monitor size. Basically, here is the code I'm using:

body
{
text-align:center;
}
.main
{
position:absolute;
left:23.5%;
width:50%;
height:500px;
}

.left
{
float:left;
width:200px;
height:500px;
}

.right
{
float:right;
width:200px;
height:500px;
}

I'm trying to center the main div by using left:23.5% and setting the width with width:50%. The problem is that the main div will overlap the other divs depending on the size of the monitor that I'm viewing the page with. Would you recommend that I just use tables, or can you think of a fix? urgh css is a pain. thanks in advance