Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 14
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
Vaxian (17)


Next birthdays
05/21 Dalus (34)
05/21 Kizmo (37)
05/22 Skynet (32)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Computer Science
« Previous topic | Next topic »   

Creating buttons in Dreamweaver MX

Move Thread LAN_403
Penguin7471
Sun Nov 12 2006, 06:34AM Print
Penguin7471 Registered Member #71 Joined: Thu Feb 09 2006, 08:23AM
Location:
Posts: 63
Hi all,

My site has alot of plain text hyperlinks, which is kind of boring. I want to create some buttons, similar in appearance to the google search button. In Dreamweaver, I know that it is possible to create a form button to do this. However, I can't seem to be able to adjust the length of the button itself, and the button never aligns perfectly with the text. I also can't modify the button font and text size.

Its obviously something really simple and the even the online manuals dont tell me how to do something like this.

Cheers,

Paul
Back to top
ragnar
Sun Nov 12 2006, 06:50AM
ragnar Registered Member #63 Joined: Thu Feb 09 2006, 06:18AM
Location:
Posts: 1425
Open the source code, and add the attribute
style='width:200px;'
etc. to your <input> element.
Back to top
Penguin7471
Mon Nov 13 2006, 01:09AM
Penguin7471 Registered Member #71 Joined: Thu Feb 09 2006, 08:23AM
Location:
Posts: 63
Hi, thanks for that BlackPlasma (or balsamplack mistrust )

I've figured out how to edit the font, and button width. Is there a way to edit the colour of the button.... and also make the inside text bold?
Back to top
ragnar
Mon Nov 13 2006, 01:21AM
ragnar Registered Member #63 Joined: Thu Feb 09 2006, 06:18AM
Location:
Posts: 1425
You're welcome -- and to clear things up, you can call me Matt (or Tam) :P

To change the colour, go back into the source and append to your "style:" attribute:

color:#99ccff;
background:#003366;
font-style:bold;

Your tag would then read:
<input style="width:200px;color:#99ccff;background:#003366;font-style:bold;" ... >
etc

You can also use shortened HEX (e.g. color:#9cf;) or names (e.g. color:red;) when defining the colours.
Back to top
Penguin7471
Mon Nov 13 2006, 07:42AM
Penguin7471 Registered Member #71 Joined: Thu Feb 09 2006, 08:23AM
Location:
Posts: 63
Hey,

Cool, thanks for those. But haha.. is there any way to use a picture as the background for the button?

Oh yes, the text bold thing didnt work, so I eventually figured out it was font-weight, and not font-style..
Back to top
ragnar
Mon Nov 13 2006, 12:19PM
ragnar Registered Member #63 Joined: Thu Feb 09 2006, 06:18AM
Location:
Posts: 1425
wrote ...
font-weight, and not font-style..
D'oh!! My apologies.

wrote ...
is there any way to use a picture as the background for the button?
Yep, try:

style="background:url('path/picture.ext') top left no-repeat #003366;"

You may replace "top" "left" with "bottom" "right" "center" or a px, em, or % value, and similarly you can replace "no-repeat" with "repeat-y" or "repeat-x" or remove it altogether for the picture to tile in both directions. If the background has transparent pixels or doesn't tile, then you can define a background colour as well, as you see.

Back to top
Alex
Mon Nov 13 2006, 09:36PM
Alex Geometrically Frustrated
Registered Member #6 Joined: Thu Feb 02 2006, 04:18AM
Location: Bowdoin, Maine
Posts: 373
Matt is doing a good job of answering your questions, Penguin, but an even better solution would be to learn HTML and CSS yourself. Dreamweaver creates mangled code and as you get more specific, it becomes more of a hinderance than anything.

Learning HTML and CSS will require a bit of effort, but I encourage you to do so. The results are rewarding, and writing clean code is more fun than battling Dreamweaver. If you're interested, Tizag.com has an HTML and a CSS tutorial, and W3 Schools is a useful reference.
Back to top
ragnar
Mon Nov 13 2006, 11:43PM
ragnar Registered Member #63 Joined: Thu Feb 09 2006, 06:18AM
Location:
Posts: 1425
I was getting to that... wink
Back to top
Penguin7471
Tue Nov 14 2006, 12:50AM
Penguin7471 Registered Member #71 Joined: Thu Feb 09 2006, 08:23AM
Location:
Posts: 63
Ah yes you're probably right Alex. I'll have a look through those tutorials.

Cheers for the info guys.
Back to top

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.