Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Border-image alternative?

Featured Replies

Hey guys, i'm really new to web development, and I have purchased Dreamweaver for the purpose of learning to create my own website. I'm getting along well, I think :p

 

What I want to do is create a dynamic div so I can resize and reuse it. Problem is, is that it is semi-transparent and I want a semi transparent border around it. I have looked at a few waysto aproach it, but none gave me all round cross browser support. So is there any way to have a transparent border with crossbrowser support. Even if it means a lot of css coding. I'm a programmer anyways.

 

Maybe the old school trick of spliting the image up and making it a border will work, but where do I start???

 

-Zinglish

If you put these:

 

.blahblah {

opacity:0.6;

filter: alpha(opacity=60);

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";

backgrond-color:black;

}

 

it would make your div semi-black in every browser (firefox/ei6,ei7,ei8 - for sure) :pp

 

So you can you use it as a bigger div - as a border + a menu in smaller div. There might be a small problem though : inheritence;(

 

If you think this solution would be ok you can check out this link:

http://www.stevenyork.com/tutorial/pure_css_opacity_and_how_to_have_opaque_children

The alternative if forgetting about using a border property on your div element.

The best solution is to:

 

create a DIV element with a style background-colour: your desired border colour.

create an inner DIV element with a style of your desired page background colour.

 

You know how to create transparency and this will work on the background.]

 

Gary

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.