Jump to content

ToonMariner

Members
  • Posts

    3,342
  • Joined

  • Last visited

Everything posted by ToonMariner

  1. alll those extra </ul> won't help any!
  2. OK. I want to control the text in a label so that if it breaks onto the next line it does NOT go under teh check box. HTML[code] <label class="inline"><input type="checkbox" name="prodcat_tie[]" value="1" checked="checked" />Travelling Incognito</label> [/code] I am floating the label so that I can display a large number of categories in one place and have set the width so they line up nicely css so far[code] label.inline { float: left; width: 130px; margin-right: 10px; white-space: normal; height: 3em; }[/code] (the height I have set so that the next line of checkboxes starts at the left.) Now at the minute the above creates... [pre] []Travelling Incognito [/pre] and I would prefer [pre] []Travelling   Incognito [/pre] Any help much appreciated...
  3. WHY? <input type="reset" name="reset" value="Reset" /> That does it all for you - only use js when your really have to and if you just want the defaults then you don't need it.
  4. Use the datatime type in your database table and use the query to make the comparisons - mysql's support for date/time manipulation/calculations is far greater than php's
  5. Note that that this behavior is deprecated in the css spec..
  6. Works fine for me... Make sure you declare #chk_links a:link { text-decoration: underline; } after the other a declarations - also clear your cache (just in case)
  7. Brilliant!!!! Thank you VERY much.
  8. put a link to your pages up (both if poss).. there is something else wrong here ur alt tags should not interfer in the manner you suggest.
  9. I think I need to do a negative lookahead, something like..[code]filestr = preg_replace('/li#nav' . $id . ' a(.*)\/nav\/(?!(\.gif))\.gif/s','li#nav' . $id . ' a$1/nav/' . $styles[$newsty] . '.gif',$str);[/code] But how do I get that negative lookahead to include linebreaks?
  10. Sorry. a typo shoudl be $id. So the regex is...[code] <?php $filestr = preg_replace('/li#nav' . $id . ' a(.*)\/nav\/(.*)\.gif/s','li#nav' . $id . ' a$1/nav/' . $styles[$newsty] . '.gif',$str); ?> [/code] (this is going into a function so $id will chage) so With[code]<?php <?php $str = "#nav li#navintroduction a { background: transparent url(../images/nav/red.gif) no-repeat 0 0; } #nav li#navproducts a { background: transparent url(../images/nav/lightblue.gif) no-repeat 0 0; } #nav li#navbargain_selection a { background: transparent url(../images/nav/orange.gif) no-repeat 0 0; } #nav li#navspecials a { background: transparent url(../images/nav/brown.gif) no-repeat 0 0; } #nav li#navcontact a { background: transparent url(../images/nav/purple.gif) no-repeat 0 0; }"; $styles = array ( 1 => 'red' , 2 => 'lightblue' , 3 => 'orange' , 4 => 'brown' , 5 => 'purple' ); $newsty = 4; $id = 'products'; $filestr = preg_replace('/li#nav' . $id . ' a(.*)\/nav\/(.*)\.gif/s','li#nav' . $id . ' a$1/nav/' . $styles[$newsty] . '.gif',$str); ?>[/code] So with $id = "products" and $newsty = 4 I would like get #nav li#navintroduction a { background: transparent url(../images/nav/red.gif) no-repeat 0 0; } #nav li#navproducts a { background: transparent url(../images/nav/[color=blue]brown[/color].gif) no-repeat 0 0; } #nav li#navbargain_selection a { background: transparent url(../images/nav/orange.gif) no-repeat 0 0; } #nav li#navspecials a { background: transparent url(../images/nav/brown.gif) no-repeat 0 0; } #nav li#navcontact a { background: transparent url(../images/nav/purple.gif) no-repeat 0 0; }
  11. Whne you specify a background image I believe it overwrites the default (which would be the number!). So I am assuming you simply want a background behind the number itself. You need a margin to show the number (one case where IE got it right as FF uses the elements padding - or did do) so make sure you leave that there.
  12. yep the image has a bit of a white(ish) border!!
  13. Make your own - its easy! at least then you can make it do exactly what you want.
  14. have a read on the session.use_cookies and session.use_only_cookies and have a look at [url=http://uk2.php.net/manual/en/ini.php#ini.list]http://uk2.php.net/manual/en/ini.php#ini.list[/url]
  15. You would be better off using preg_replace and generating an arary keywords (like ': P') and and an array of corresponding smileys '<img src=....' that way you can do all replacements at once with just one line fo code (and the two arrays of course)
  16. Hi peeps, OK i have a series of statements in a css file like so [code] #nav li#navintroduction a { background: transparent url(../images/nav/red.gif) no-repeat 0 0; } #nav li#navproducts a { background: transparent url(../images/nav/lightblue.gif) no-repeat 0 0; } #nav li#navbargain_selection a { background: transparent url(../images/nav/orange.gif) no-repeat 0 0; } #nav li#navspecials a { background: transparent url(../images/nav/brown.gif) no-repeat 0 0; } #nav li#navcontact a { background: transparent url(../images/nav/purple.gif) no-repeat 0 0; } [/code] WITH THE NEW LINES What I need to do is alter the image name (just the first part) based on id of the li element. This is what I am trying but no joy as yet (i think i am pretty close though ;)) [code]<?php $str = "#nav li#navintroduction a { background: transparent url(../images/nav/red.gif) no-repeat 0 0; } #nav li#navproducts a { background: transparent url(../images/nav/lightblue.gif) no-repeat 0 0; } #nav li#navbargain_selection a { background: transparent url(../images/nav/orange.gif) no-repeat 0 0; } #nav li#navspecials a { background: transparent url(../images/nav/brown.gif) no-repeat 0 0; } #nav li#navcontact a { background: transparent url(../images/nav/purple.gif) no-repeat 0 0; }"; $styles = array ( 1 => 'red' , 2 => 'lightblue' , 3 => 'orange' , 4 => 'brown' , 5 => 'purple' ); $newsty = 4; $id = 'products'; $filestr = preg_replace('/li#nav' . $new . ' a(.*)\/nav\/(.*)\.gif/s','li#nav' . $new . ' a$1/nav/' . $styles[$newsty] . '.gif',$str); ?>[/code] So basically I just want to change the initial part of the file name BUT I think preg_replace is greedy (is it?) so i am not getting anything lie what i expect. Hopefully from the code you will be able to see what I am trying to do, and even more hopefully point me in teh right direction. Cheers people.
  17. it will last as long as the connection lasts - you can use the same name for the table in everyones connection - they will only see the 'table' created for their connection.
  18. I suspect you are setting the background colour of the a tag still - which will override any li or ul background colors.
  19. shopping carts are much easier than many make out. I would use a database for teh products and simply create an array with the product id as a key and iits value being the number of that prodcuct - assigin it to a sesion and hey presto you have a shopping cart.
  20. you may need to use umask(); and also check to see if open_basedir is set on the server - if it is you will only be able to get php to manipulate the files/folders within that floder.
  21. Well all I can say is that Orio is much closer at getting the result you want - if this is really beyond you perhaps go into the freelancing forum and see if someone will do it for you. What you are trying to do will show the whole of that page in your iframe...
  22. You will need to set the margin of your sub list li elements! the top level has margin & paddin 0 this is inherited by child elements so make sure you give ul ul li{ margin: 0 0 0 5px;}
  23. I think you really need to explain this better. do you want the form to show in your site or do you want to show the results of that form wfter giving your users the options to input data?
  24. So much going on!!!! Firstly place a doc type declaration at the top. Now the first issue of getting the page centered... DO NOT use the text align to get the page centered... Set the width of the html to 100% and then the width of the body tag to what you want (700px) and then use margin: 10px auto; That will give a margin at tht top and bottom of the page of 10px and center the rest. You have unneccessary html in there - you don't need container2.... all your tags should be lower case - (is frontpage involved here??? don't use it its crap!) Any more help just post here or feel free to IM me on messenger
×
×
  • 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.