/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Cause of extra space between buttons?

In the following there are 4 rows of over-sized buttons. At the moment, the buttons do not trigger events.

The 2nd row adds some extra space after the 1st button in the row. 😮

I assume the extra space t is because I am trying to create a multiple line text in the button, but I don’t know how to remove the space.

Any suggestions? ?

[code]
<!DOCTYPE html>
<html lang=”en”>
<head>
<meta charset=”UTF-8″ />
<title> Button Menu </title>

<style type=”text/css”>
.menuBtn { width:150px; height:100px; font-size:1.1em; }
.menuBtnF { background-color:red; color:white; }
.menuBtnO { background-color:orange; color:black; }
.menuBtnU { background-color:green; color:white; }
.menuBtnB { background-color:blue; color:white; }
</style>
</head>

<body>
<button class=”menuBtn menuBtnF”> WebDeveloper </button>
<button class=”menuBtn menuBtnF”> CodingForums </button>
<button class=”menuBtn menuBtnF”> DreamInCode </button>
<button class=”menuBtn menuBtnF”> DynamicDrive </button>

<br>
<button class=”menuBtn menuBtnU”> Nova<br>Southeastern<br>University </button>
<button class=”menuBtn menuBtnU”> Optometry </button>
<button class=”menuBtn menuBtnU”> Library </button>
<button class=”menuBtn menuBtnU”> Homepage </button>

<br>
<button class=”menuBtn menuBtnO”> COP </button>
<button class=”menuBtn menuBtnO”> OTM-1 </button>
<button class=”menuBtn menuBtnO”> OTM-2 </button>
<button class=”menuBtn menuBtnO”> OTM-3 </button>
<button class=”menuBtn menuBtnO”> OTM-4 </button>

<br>
<button class=”menuBtn menuBtnB”> Optics </button>
<button class=”menuBtn menuBtnB”> Theoritical </button>
<button class=”menuBtn menuBtnB”> Physical </button>
<button class=”menuBtn menuBtnB”> Clinical </button>

</body>
</html>
[/code]

Note: During further testing, adding some <div> tags around the rows does not change the display either.

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@JMRKERauthorOct 11.2013 — Got it...

Change the class...
<i>
</i>.menuBtn { width:150px; height:100px; font-size:1.1em; vertical-align:top; }

to add the vertical-align:top or vertical-align:bottom;

Either one works well.
×

Success!

Help @JMRKER spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...