Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Paste into the bottom of your code (needs jquery)
- <div class="width">
- <script type="text/javascript">
- $(window).resize(function(e){
- var width = $(window).width();
- $(".width").html(width);
- });
- $(document).ready(function(e){
- var width = $(window).width();
- $(".width").html(width);
- });
- </script>
- </div>
- Style with:
- .width {
- position: fixed;
- background: #dd4400;
- color: white;
- height: 2em;
- line-height: 2em;
- width: 70px;
- text-align: center;
- top: 40px;
- left: 48%;
- font-weight: bold;
- }
Add Comment
Please, Sign In to add comment