hey folks,
i have a fieldset. in which the legend the text display. showing 1 of 2 and it has next and previous arrow for going on next record and back. i am having trouble. i have 2 fieldset boxes.floating next to eachother and both have showing 1 of 2 (depending on record set). i can’t make the arrows sit at place. here is my code
The legend is pretty hard to style at best of times and is best left alone being just a legend describing the form controls contained within the fieldset.
Pagination is a completely separate element with a different function.
Paul is on the right track – and word of advice, you’ll find your code a lot less of a train wreck if you use ECHO instead of constantly dropping in and out of parse mode for no good reason with <?php ?> – but there’s a reason I consider using php as a ‘on/off scripter’ to be a crutch for people coming from crappy languages instead of using it like a real programming language.
It also helps not to drag execution to a crawl by doing the double quote escape double quote nonsense. Single quotes are faster, and you don’t have to turn the code into a confusing MESS by escaping everything.
Some carriage returns and tabs wouldn’t hurt either… and TITLE doesn’t belong on IMG, ALT does. You want to use TITLE put it on the ANCHOR.
It also wouldn’t hurt to get rid of the things that have no business in modern markup like the border attribute, non-breaking spaces to do padding and white-space:nowrap’s job, and as paul pointed out lose the span being used to do what can be directly done to the anchor.
… and as Paul mentioned, legend is a pain in the ass to style, which is why I usually put a dummy span inside the legend and APO it off the fieldset or div wrapping the fieldset (since fieldsets also are completely unpredictable cross-browser).
It sucks to put the extra div around the fieldset and the span inside the legend, but you cannot trust either element for to accept styling the same way cross browser but you need them for semantics – so you have to use semantically neutral wrappers to fix that.
… and don’t give me that horse hockey you hear from php developers on how it’s too hard to make clean code output or use single quotes instead of doubles, because, well… there it is