Jump to content

Creating an opaque background behind body


Fish181

Recommended Posts

Hi,

 

I want to put an opaque background behind my website that is a project for school. 

 

Here's my project for school:

 

http://gyazo.com/33eddfa1242478b0cdf53dbda114df5a

 

And what I want is an opaque background like the ones found on twitter:

 

http://gyazo.com/59afbe6c4fe9cba669acca916e547c8a

http://gyazo.com/55bfed8a0e2431d4acc02f41b72496eb

 

I'm a pretty big noob when it comes to this so any help would be greatly appreciated. 

Edited by Fish181
Link to comment
Share on other sites

  • 4 weeks later...

Well from the Twitter images, it looks like you want the semi-transparent background? Opaque means you can't see through it, so either I'm confused as to what you want, or you're confused on the meaning.

 

Anyway, if you want the partially transparent background, then a very simple way to do it would be to give the div a background colour of white using the rgba setting:

 

#div {
  background-color: rgba(255, 255, 255, 0.5);
}

 

The 0.5 means it's 50% transparent. That will allow some of the background to show through, while still allowing the text to be read fairly easily, however you will have to play with the values to find the right balance.

 

Hope that helps,

Denno

Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.