Jump to content


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About ben03

  • Rank

Contact Methods

  • Website URL
  • ICQ

Profile Information

  • Interests
    Digital design
  1. Thanks for your help with this dsoneuk. At this point in time it is the only option. It makes sense what you are saying, and can see how this is a less-than ideal scenario. I will continue to explore options...
  2. Hi there, I have a scenario where I have no option but to absolute position some elements within a div. So I set the parent to position relative, the children absolute, job done. But if I float the parent container to the right, it jumps outside its wrapper. Is there a way to stop this happening? .wrapper{} .parent{position: relative; float: right;} .child{position:absolute;} <div class="wrapper"> <div class="parent"> <div class="child"></div> <div class="child"></div> <div class="child"></div> </div> </div> Thanks
  3. ben03

    Can Input field fill remaining width?

    Thank you, this is well considered! help is much appreciated
  4. Hi, I am attempting to create a form control with an input field in the centre, and plus/minus buttons either side. The buttons have an absolute position set so they remain at either edge of the parent container, with the input (ideally) adjusting in with to make up the remaining width. Only in practice it doesn't. I can't really set a width to the input as it needs to adjust the width to for different screen widths. The code: .responsive-container{position: relative; width: 100%;} .minus-button{position: absolute; left: 0; width: 40px;} input{position: absolute; left: 40px; right: 40px; width: auto;} .plus-button{position: absolute; right: 0; width: 40px;} <div class="responsive-container"> <a class="minus-button">-</a> <input> <a class="plus-button">+</a> </div> Hopefully you can see what I am trying to achieve here. If I set the input to 100% width, it goes beyond the container because it has been budged by 40px. Setting it's width to auto doesn't seem to fill the space correctly. Any pointers here appreciated!
  5. ben03

    Fixed sidebar issue

    Ah good shout, Thanks for your help on this.
  6. ben03

    Fixed sidebar issue

    Hi there, I am trying to build an expanding sidebar menu that is absolute positioned to the left of the screen and spans top to bottom. I don't want to be using fixed position, as the sidebar would have elements that would be hidden beneath the fold on mobile landscape that wouldn't be accessible. So it needs to scroll with the page content. However when using absolute positioning, the container finishes wherever the bottom of the browser is, and is simply cut off there, which looks bad if the rest of the screen content requires scrolling. What I am using: .expanded-menu, .collapsed-menu { position: absolute; overflow: hidden; background-color:$dark-blue; top: 0px; left: 0px; bottom: 0px; z-index: 5; @include transition (all 0.5s ease-in-out); } .collapsed-menu { width: 50px; } .expanded-menu { width: 170px; } Am not sure if this is asking the impossible, or whether the answer is staring me in the face and I've looked too long at it. Help appreciated here Thanks
  7. ben03

    Hide/Show if elements are checked in forms

    Ah great, I can see this now thanks dsonesuk for your help!
  8. Hi there, I am trying to only allow a 'next' button to show if a form element is selected. For some reason I am only succeeding to hide the button, and not reveal when the radio button is selected. I am sure it should be relatively simple... The code: .ampwizard .button {opacity: 0;} input[type="radio"]:checked .ampwizard .button{opacity: 1;} <div class="ampwizard"><input type="submit" class="button" name="install-next" value="Next" /></div> Help appreciated with thanks!
  9. ben03

    Rule being ignored

    Hi there, My htaccess is ignoring one of the rules I have put in! I don't imagine I am blameless here, so am hoping someone can point out what I have done wrong and how to fix it. The lines in bold (forwarding the non www request to the address with the www) seems to be failing. I tried re-ordering the rules, but no joy as yet. If someone could help me as to what needs amending here I would be really appreciative. Thanks! <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^oldsite.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.oldsite.co.uk$ RewriteRule (.*)$ http://www.newsite.co.uk/$1 [R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC] RewriteCond %{HTTP_HOST} ^newsite.co.uk$ RewriteRule (.*) http://www.newsite.co.uk/$1 [R=301] Redirect 301 /oldpage http://www.newsite.co.uk
  10. ben03

    htaccess rule not working

    Thank you justsomeguy. I am assuming it is the ',L' that needs removing from each of the brackets? That is the danger of taking different snippets from different tutorials I suppose. Thanks for the help
  11. ben03

    htaccess rule not working

    Hi there, I am using a few of re-write rules, the last of which is not working. I assume it clashes with the others in some way? <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^oldurl.co.uk$ [OR] RewriteCond %{HTTP_HOST} ^www.oldurl.co.uk$ RewriteRule (.*)$ http://www.newurl.co.uk/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] RewriteCond %{HTTP_HOST} ^newurl.co.uk$ RewriteRule (.*) http://www.newurl.co.uk/$1 [R=301,L] </IfModule> Any pointers here would be greatly appreciated! Thanks
  12. Hi there, I was following this a tutorial about adding a page fade-in once the page has loaded. It is set up so it works even if javascript is disabled, which is ideal. https://www.abeautifulsite.net/a-clean-fade-in-effect-for-webpages However i am trying to add another class the snippet to the script tag that appears immediately after the opening <body> tag: <script>document.body.className += ' fade-out'; $(".wrap").addClass(" fade-out");</script> However I am getting the following error: "Uncaught ReferenceError: $ is not defined". I am assuming this is because I am not calling in jquery in the header? But why then does it work fine without my additional snippet? Maybe I am taking the wrong approach here, let me know if this could work. Thanks
  13. Hi there, I'm not sure if I am missing something obvious here. I am using Hind Guntur font in a website https://fonts.google.com/specimen/Hind+Guntur however the spacing between words disappears in the browser. Why is this? I noticed this also happened with the ttf when using it in photoshop.
  14. Hi there, I was trying to research on Google, but without the correct terminology I wasn't winning, so perhaps you guys can help point me in the right direction: I am hoping to set up a button that my users can click when they've added a new post to my site that would post a link on the websites Facebook page. Pointers would be greatly appreciated! Thanks