Jump to content

nano

Members
  • Posts

    90
  • Joined

  • Last visited

    Never

Everything posted by nano

  1. Hey Guys, I have a CSS question, think I'm in the middle of a brain freeze so any help would be appreciated. I have knocked up a jsFiddle link, which can be found here: http://jsfiddle.net/cwvK9/4/ Basically the div with class 'author', I want to bring up and the paragraph text wrap around it. I didn't really want to compromise the mark-up, so wondered what the best way via CSS would be - probably something really straight forward! An example can be seen here: http://i.imgur.com/GPjTy.png I need to provide IE7+ support. Thanks!
  2. Hey Guys, I am building a parallax website where different elements move on scroll. It's different to the traditional 'changing background position' style, as there are multiple individual elements that I want to move. Here is what I have so far: var parallax = { init: function(){ parallax.scroll('.cc',0.95); }, scroll: function(el,speed){ var $window = $(window); $(el).each(function(){ var $this=$(this),top=$this.position().top,offset=$this.offset().top; $window.bind('scroll', function() { var scrollTop=$window.scrollTop(); if ((scrollTop + $window.height()) >= (offset) && ((offset + $this.height()) > scrollTop)) { // el is in-view pos = ;// how to set 'pos' variable?! $this.css({"top": pos}); // set new position } }); }); } }; $(document).ready(parallax.init()); The issue I am having is I can't come up with the logic required to work out the 'pos' variable, the new position. My head now hurts trying to work it out so if anyone has any ideas, they would be greatly appreciated! Cheers
  3. nano

    background

    As above, hex value is a colour so no need for repeat or position. Simply set the background colour on each element/column.
  4. Without seeing the whole of the code it's hard to see what the issue is, however it could be because you have a space when setting the id on bg (between id and =).
  5. nano

    background

    If you are simply setting the background colour of an element then there is no need for setting position or repeat. Just simply set the colour: background-color:#fff;
  6. As you are floating items within the navigation, the browser can't work out the height of the container. The following fix should help: .nav{overflow:hidden;}
  7. nano

    round corners

    If you don't mind using a JavaScript you could give CSS3 PIE a go: http://css3pie.com/
  8. Actually that is not true - the doctype is fully backwards compatible back to IE6. It will make sure quirks mode isn't rendered and modern browsers will specifically know it's HTML5. It is only the elements such as nav, aside, article etc that IE has a trouble with, which is why a JavaScript HTML5 Shiv exists.
  9. Just to second other peoples thoughts - the marquee is crazy, I would drop it The dashboard is really nice, simple and straight to the point. Great start
  10. Do you have any code snippets that can shed some light on the issue? It's hard to fully understand the issue with out seeing a demo or some code
  11. Hi, Position isn't actually needed with what you are trying to do. Take a step back, remove all the positions and see how it looks, then rather then apply positions, see if you can achieve what you want by adding different values. For example, set the image to display:block; add a margin and then see how it looks. I don't fully understand what you are trying to achieve but positions are one of those things that should only really be used when you really need to, which is very little in most cases! Good luck
  12. Yeah the 2nd table was kind of floating as it wasn't within it's own row and table cell. That said, is there a reason you are using tables and the font tag? It's not very semantic and won't help with SEO or accessibility. Try using a proper semantic structure such as paragraphs, ordered lists etc. Also move all inline styles and fonts into your external stylesheet
  13. HTML5 doctype is understood by all browsers and it's the minimum that you can get away with so there is no reason you can't use it from the off. For example check Google's source. No need to go for strict or loose unless you have the validation requirements.
  14. I guess it all depends on where the error message is happening. Is it happening at the end of a body of text? Then you could use a paragraph tag. If its happening above an input, then I would use an inline element like strong, em, span etc. Good luck
  15. Ultimately your error message will be a line of text and proper semantics would make it be a paragraph. You could use em inside a paragraph to stress the emphasis of the message but definitely a paragraph would be a win for me!
  16. Thanks Stiver! It's nice to get some feedback Cheers
  17. Hey Guys, I would love to get your feedback on our new agency website. We launched it a few weeks back and would love to hear your thoughts. http://honestideas.co.uk A lot of agencies seem to hide away from their work so the point of this website is to literally show case our work. At the end of the day, you're only as good as your last piece of work. Let me know your thoughts guys! Cheers
  18. Thanks guys, appreciate the extra info
  19. Unreal.. I was sitting here for the past 2 hours thinking where has the 5 extra characters come from.. then it hit me.. the pound sign.. (£). I removed that and then both strings matched in length.. it must be the way an input value is stored or text encoding as you mention. An odd error but I'm glad it's resolved! Thanks.
  20. I am truly stumped on this one.. I have an array that contains the string: "185 - PGB_4364 - 7 x 5 Inches - (£3.00)" and on a page I have a hidden input with the value of: "185 - PGB_4364 - 7 x 5 Inches - (£3.00)" However when doing a var_dump() - it is telling me they are different lengths? off by 5.. I am trying to do if the string == the $_post then do something, however they never equal the same because of the length difference? a difference I just can't see! var_dump($item['name']); string(45) "185 - PGB_4364 - 4 x 6 Inches - (£2.00)" var_dump($_POST['product']); string(40) "185 - PGB_4364 - 4 x 6 Inches - (£2.00)" Has anyone come across this before? And if so, what would be the best way to resolve this.. I need both strings to match each other Here is my code, there the code never gets inside the 2nd if: if ($_POST['remove']) { $products = $_SESSION['purchase']; foreach ($products as $key => $item) { if ($item['name'] == $_POST['product']){ unset($products[$key]); } } $_SESSION['purchase'] = $products; } Cheers
  21. Damn it.. I needed the stripos() not strrpos()... talk about confusing
  22. Hey Guys, I have the following string: 184 - fashion - 4 x 6 Inches - (£2.00) And I am trying to retrieve the 184, using the strrpos() function, it seems to take everything before the last occurrence of '-'.. I thought strrpos() would stop at first occurrence and pass me the 184 Anyone have any ideas how I can pull back just the numbers before the first '-'? Sample: $input1 = strrpos($_POST['product'],"-"); $article = substr($_POST['product'],0,$input1); $article outputs: 184 - fashion - 4 x 6 Inches Cheers
  23. Hmm rather then using an iframe, I wonder if it would be better to do an AJAX call for the content? If your content you are loading, is just a raw PHP file containing a table then that might work. jQuery load() - http://api.jquery.com/load/ Example: $(document).ready(function() { $('#tab3').load('table.php'); }); If you're file contains all the HTML body tags etc, as in a new page - you can do the following to just pull back a certain section: $(document).ready(function() { $('#tab3').load('table.php #container'); }); Then have a button inside your table.php file - that on press, it will simply run a function that loads the content within that div again (triggers the same code as above) - this will mean you won't have to reload the whole page each time. Let me know if that works.. I never like playing with iframes
  24. Sounds like you're taking on a mammoth build I am not a PHP developer but to get you started, I would probably take the following approach: $('form input:submit').click(function() { var selected = ''; $('select option:selected').each(function () { selected += $(this).text() + " "; }); // Go and store selected in session or cookie, use split() to set options on return (if session exists) }); If you are using jQuery then the above will kick you off, the concept would be to store the selections either in PHP Sessions or via Cookies. Cookies have a read here: http://www.w3schools.com/JS/js_cookies.asp PHP sessions - no idea Good luck
  25. I love the concept behind your creation but I am not sure the site actually sells the story like you did in this post. My comments are from a usability/design perspective and not from the backend accounts way etc. As said, the concept is great - I was thinking of building something similar myself a few months ago but haven't found the time. For you, I would look at the Dribble concept/project: http://dribbble.com/ It's a place designers can show off their latest designs - the site is invitation only, to keep the standards high. You should maybe look at how that site functions and how the layout currently works. Try and have something simple and clean that can tell users exactly what you site is for and what it does. Another site with a similar concept is Forrst: http://forrst.com/ Again, invitation only - a place where designers and developers can show off their ideas. For me, the user interface is key to attract new users and keep old ones. So have a look at the sites above and I would suggest reworking your current design concept to fit within their realms. Good luck with it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.