TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 01-12-2008, 01:22 PM   #21 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

I tried
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
But it didn't work :S
Tanax is offline  
Reply With Quote
Old 01-12-2008, 01:47 PM   #22 (permalink)
The Addict
Top Contributor Good Samaritan 
 
Join Date: Jan 2008
Location: USA
Posts: 217
Thanks: 16
RobertK is on a distinguished road
Default

Okay, are you working in a designer like Dreamweaver or Frontpage (*shudder*) or an editor such as phpDesignerPro? The designers will rewrite anything you write, which is why I gave up on Dreamweaver MX, and it won't really matter what you do.

If you'd like some examples see this site, as they've free templates. Nothing against learning from someone else's tested work.

And a full XHTML Transitional template, courtesy of webstandards.org, is:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<title>Conforming XHTML 1.0 Transitional Template</title>

</head>

<body>

</body>

</html>
Note the second line. I've found it to be important at times.

If I have time this afternoon I will make you an example. If not, someone else may have to show you working code. I threw one together just yesterday that worked, the exact manner I described, so I know it can be done.
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning. - Rich Cook
RobertK is offline  
Reply With Quote
Old 01-12-2008, 02:28 PM   #23 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

I copied your code, and just inserted the link to my css, and the divs for the button. Still the same result :S

I'm going nuts.. -.-'

EDIT: Does it matter if my file is called index.htm instead of index.html ???
Tanax is offline  
Reply With Quote
Old 01-12-2008, 07:34 PM   #24 (permalink)
The Addict
Top Contributor Good Samaritan 
 
Join Date: Jan 2008
Location: USA
Posts: 217
Thanks: 16
RobertK is on a distinguished road
Default

After some experimentation I no longer can reproduce my last success, so I've no clue what I did anymore. I have a feeling I'm doing exactly the same thing now, but the results just don't work. Inline doesn't work either, because it forces a height collapse. My suggestion if you want resizing buttons like that, do it all with html, it's simpler.

There's no good way to do this. You'll have to give fixed width to block type elements. The best way to do this is to use an unordered list for your row of buttons. Then you set their display type to inline, the list-type to none, and then it might work. Otherwise, you'll just have to work on it. I've answered as best I know and I can't keep troubleshooting this.

Sorry, I've helped as best I can. Some things are just really ugly without going with CSS as much as you can. Just try one background image, just the gradient, with a 1 pixel border to a link element; inside the link (the caption) needs to be in a span with a 1px different color border. If you want padding, or explicit height, set the span to have it. This is off the top of my head, I have got to get this database class working, and I don't have time to support it today. Sorry.
__________________
Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning. - Rich Cook
RobertK is offline  
Reply With Quote
The Following User Says Thank You to RobertK For This Useful Post:
Tanax (01-12-2008)
Old 01-12-2008, 08:35 PM   #25 (permalink)
The Wanderer
 
victorius's Avatar
 
Join Date: Nov 2007
Location: Denmark
Posts: 21
Thanks: 4
victorius is on a distinguished road
Default

Hi, I threw together a little something. I tried to recreate it like your screenshot.
It does not look like yours. It's missing the white inner border.

But I don't like the multiple tags and images needed to accomplish this.

Here I just use the button tag. Of course not the only way to go, but it's great to be able to use a proper html tag and get good looking buttons. No wrapping divs etc.

For me personally I like this way better. I keep all presentation in CSS (meaning I don't need anything extra in HTML for presentation purposes). I also use a transparent gradient png background image and have full control over the background color.

Take a look at the screenshot and then the code if you want.

P.S. I didn't realize that the middle button is page numbers (pagination). Hence will probably not work within a single button. I just read that you wanted to code a button, so I thought of nothing else.

But I'll post this anyway, maybe you can use it or someone else will find it useful. Feel free to use the png background image for buttons or navigation.

Resources:
FAMFAMFAM: Silk icons
W3.org: CSS Selectors
Particletree: Rediscovering the button element
Attached Thumbnails
button-buttons.png  
Attached Files
File Type: zip buttons.zip (4.4 KB, 26 views)

Last edited by victorius : 01-12-2008 at 08:36 PM. Reason: argh, forgot to attach
Send a message via MSN to victorius
victorius is offline  
Reply With Quote
The Following User Says Thank You to victorius For This Useful Post:
Tanax (01-12-2008)
Old 01-12-2008, 11:09 PM   #26 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Hey victorius! Thanks! That works exactly like I want it, FUNCTIONALITY.
Doesn't look bad either with that gradient thing you have there!

I'll try it from here and get it to work with my graphics
Thanks ALOT for your help!

And thanks RobertK too for your help
Tanax is offline  
Reply With Quote
Old 01-12-2008, 11:15 PM   #27 (permalink)
The Wanderer
 
victorius's Avatar
 
Join Date: Nov 2007
Location: Denmark
Posts: 21
Thanks: 4
victorius is on a distinguished road
Default

No problem mate. Great that you can use it. I agree with you that this works very well in contrast with having a lot of images and extra tags.

Oh, and btw. I do recommend using HTML 4 strict. That fixes alot of problems with HTML/CSS. I cannot say about XHTML transitional or otherwise.

But the difference between HTML 4 loose and strict is like night and day. With other than strict, then the browsers go into "quirks" mode. Which means that none of them even remotely display stuff consistently.

I use HTML 4 because XHML needs to be served as XHTML/XML (or something like that) and most servers don't. So your XHTML document is read as HTML anyway.

I try to write valid code though. It's not like I use the font tag :)

I'm not really an expert, but I feel that "You must write XHTML" is overhyped.

Why not XHTML ? - Mark Ng - SEO and Accessibility aware Web Developer London, England
Quote:
The conclusion I come to is that unless you have a compelling reason to use XHTML, you should continue to use HTML 4.01 (preferably Strict). Where you have reason to use XHTML 1.0 in production, you should be well aware of the problems dealt with in Appendix C of the specification and elsewhere in this document. Where you have reason to use a newer version of XHTML, you must provide alternative content for browsers that aren't aware of XHTML.
Why XHTML? - Robert’s talk - Web development and Internet trends

HTML or XHTML? - Robert’s talk - Web development and Internet trends

Last edited by victorius : 01-12-2008 at 11:36 PM.
Send a message via MSN to victorius
victorius is offline  
Reply With Quote
Old 01-12-2008, 11:25 PM   #28 (permalink)
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Yea, actually, with this code it's much easier to add another button
Tanax is offline  
Reply With Quote
Old 01-15-2008, 09:39 AM   #29 (permalink)
The Contributor
 
Join Date: Apr 2005
Location: Kent, UK
Posts: 54
Thanks: 0
Dr John is on a distinguished road
Default

I suggest you go read up on the slding doors technique for making expanding buttons. It's well documented and used a lot.
A List Apart: Articles: Sliding Doors of CSS
google reveals several variations and some prebuilt menus eg
Free CSS Navigation Menu Designs at ExplodingBoy
Stu Nicholls | CSSplay | Experiments with cascading style sheets | Doing it with Style has some variations too.
Stu Nicholls | CSSplay | Fitted Doors
__________________
www.kidneydialysis.org.uk
Dr John is offline  
Reply With Quote
The Following 2 Users Say Thank You to Dr John For This Useful Post:
RobertK (01-15-2008), Tanax (01-15-2008)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 06:47 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design