What's new
HTML Forums | An HTML and CSS Coding Community

Welcome to HTMLForums; home of web development discussion! Please sign in or register your free account to get involved. Once registered you will be able to connect with other members, send and receive private messages, reply to topics and create your very own. Our registration process is hassle-free and takes no time at all!

html message over html page?

clyde

Junior Member
i want to create an alert \ announcement to viewers on a webpage of mine.

the way i want to do is is have a message displayed over an already existing page. no popups or javascript message boxes or anything like that.

anyone know how to go about doing this?
 
Well, there /are/ ways to do it in plain HTML. They're not /good/ ways, but they're doable. I would highly recommend using Javascript, this is what it's made for. The simplest way would be to make a div that stretches across the page that's invisible, but when visible is a semi-transparent black overlay. Then make another div inside it, centered, which contains your message, and have whenever you want it to appear have it become visible. Note: SIMPLEST way, not the best way.
 
If you don't like javascript's default popup message you can probably do something in a modal, have jquery make it visible. You can apply any HTML formatting to the modal you'd like.
 
Trying to accomplish this with HTML alone is really counterproductive to your time. Remember, time equals money. Javascript is much better and the standard for it. If something goes wrong then you will have a difficult time trouble shooting that. As long as it is non invasive, those types of announcements are fine. Are you familiar with using Javascript?
 
Back
Top