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.

mattusch

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    <!DOCTYPE html> <html> <head> <title>Audio Hover</title> </head> <body> <div id="hoverElement" style="width:200px; height:200px; background:blue;"> Hover over me </div> <audio id=audio style="visibility:hidden;"> <source src="youraudiofile.mp3" type='audio/mpeg; codecs="mp3"'> <source src="youraudiofile.oga" type='audio/ogg; codecs="vorbis"'> <!--In case mp3 is not supported--> </audio> <script> var hoverArea = document.getElementById('hoverElement'); var audio = document.getElementById('audio'); hoverArea.onmouseover= function(){ audio.play(); } hoverArea.onmouseout= function(){ audio.pause(); } </script> </body> </html> Here you go. As you can see it's very easy to target the play() and pause() methods of the HTML audio element with js. Just change the src attribute of the audio tag to your own sound files
  2. Like
    mattusch reacted to teodora in position: static, relative, fixed, etc?!   
    Ha, ha, welcome to our world These things are actually difficult to achieve. And from a beginner's point of view, it could be very overwhelming and difficult.
     
    Let's say the website is made out of header, left column, right column and footer. This will be your layout:
     
    <div id="container"> <div id="header"> Your header content </div> <div id="left-column"> Your left column content </div> <div id="right-column"> Your right column content </div> <div id="footer"> Your footer content </div> </div><!--end container--> Fist, the container. Give it a width of 960px and margin 0 auto.
    Put your logo and menu icons in the header. Put your text in the left column. Put your image in the right column.
    Then any other content like copyrights. etc, go into the footer.
     
    CSS:
     
     
    #container{ width:960px; margin:0 auto; position:relative; } #left-column { float:left; width:700px; } #right-column { float:right; width:230px; } #footer { clear:both; }  
    Hope that helps, I am not sure I can explain things properly. If you are looking for a quick fix, there isn't one, I am afraid , it is trial and error, until you get it right
    Here is another link on CSS floats, you can use floats to position divs as well. http://css-tricks.com/all-about-floats/
    You can use both floats and positions.
  3. Like
    mattusch reacted to teodora in position: static, relative, fixed, etc?!   
    It will be good if you can wrap all your content in a div called container for example, like:
     
    <div id="container"> Your content here </div> then in your css specify a width and a position for the container, and center it with margins:
     
     
    #container{ width:960px; position:relative; margin:0 auto; } Then this container will sit at the center of the screen, and all the absolute divs you might have will be positioned according to the container, for example if you have a div with position absolute and top:100px, it will be 100px from the #container. If you have a parent div with position absolute and an element within this div, which is absolutely positioned 100px from the top, the element will be positioned 100px from the parent div. Hope that makes sense
     
    If you want your site to be responsive (to fit within any device or screen resolution), you need to use % for the width of the container div. But this is not all, there are a few other things you need to have in mind when building a responsive site.
    So I believe the above solution would be good for you, for now, you will only need to zoom on a mobile device.
     
    Hope that helps

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.