/    Sign up×
Community /Pin to ProfileBookmark

rollover button at the very bottom of a banner

Hi

I was wondering if anyone can help. I have a very simple table row with a button. I am trying to place it at the very bottom of the row.

[code=php] <table id=”container” cellspacing=0>

<tr id=”banner”>
<td style=’vertical-align:bottom; padding:0; margin:0′>

<span id=button ><a href=”/dest”><img alt=dest src=”images/button.jpg” ></a></span>

</td>
</tr>

</table>
[/code]

Something like this. It goes to the bottom on ie7, but cant seem to get it there on ff and opera, any ideas on the best way to do achieve this. Should I be using baseline instead of bottom?

Question 2 – more advanced:

Eventually I want the button to have a rollover text.

[code=php]#button a:hover img
{
visibility:hidden
}
#button a:active {
background-image: url(“images/button.jpg”)
}
#button a:hover {
background-image: url(“images/button_rollover.jpg”)
}
[/code]

This works okish in IE and opera, but the rollover flies all over the place in FF. Any ideas?

to post a comment
HTML

1 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelMar 04.2007 — I can't quite figure out your request from the code you posted, but I took that and played around with it (changing some height/widths to verify), and came up with this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html><head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<meta http-equiv="Content-Style-Type" content="text/css" />

<meta http-equiv="Content-Script-Type" content="text/javascript" />

<title></title>

<style type="text/css">

* {border:0; padding:0; margin:0;}/* Set everything to "zero" */

body {min-height:100%; height:100%;

font:x-small Arial, Verdana, sans-serif;

voice-family: ""}"";voice-family:inherit;

font-size:small;/*for IE 5.5 */

} html>body {font-size:small;}

/*font-size: small; voice-family: ""}"";

voice-family: inherit; font-size: medium;*
/} /* Assist IE rendering height, keyword-font sizes, etc. */

p {font-size: 90%; line-height:1.2em; margin-top:6px;}

h1, h2, h3, h4, h5, h6 {font-family: 'times new roman', arial, verdana, serif;

font-style:normal; font-variant:normal; font-weight:normal; margin:11px 0 0 10px;}

h1{font-size: 1.93em; margin-top:12px;}

h2{font-size: 1.72em; margin-top:12px;}

h3{font-size: 1.52em; margin-top:12px;}

h4{font-size: 1.42em; margin-top:12px;}

h5{font-size: 1.32em; margin-top:12px;}

h6{font-size: 1.21em; margin-top:12px;}

#button { height:5em; position:relative; bottom:-3px;}

#button a:hover img

{

visibility:hidden

}

#button a:active {

background-image: url("images/button.jpg")

}

#button a:hover {

background-image: url("images/button_rollover.jpg")

}

</style>

<script type="text/javascript"><!--

// -->

</script>

<link rel="shortcut icon" href="favicon.ico"><!-- path to your favicon -->

</head>

<body>

<table id="container" cellspacing=0 style="width:150px; height:135px; border:1px solid black;">

<tr id="banner">
<td style='vertical-align:bottom; padding:0; margin:0;'>

<a href="/dest"><img id="button" alt=dest src="images/button.jpg" style="width:150px; height:35px;"></a>

</td>
</tr>



</table>

</body>

</html>[/QUOTE]
Something like this?
×

Success!

Help @melvster 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

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