| | #1 |
| Warrior Member Join Date: 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
I am working on WP using a template and I'm trying to get a button to float outside the main container. I went through some already posted questions here, but no luck. I have tried with padding, margin, overflow, etc. The one thing that seems to work is by setting negative margin, but in that case the div is hidden by the main container. Here's the HTML/PHP: PHP Code: Code: .purchase_options {
position: relative;
}
.buy_button {
position: absolute;
background: url(http://topgreekgyms.fitnessforum.gr/wp-content/uploads/2012/12/Button.png) no-repeat center;
color: white;
height: 67px;
width: 375px;
left: -36px;
z-index: 9999;
}
.button {
background-color: transparent;
color: #FFFFFF;
}
.button:hover {
background-color: #ffffff;
color: white;
}
.buy_button a {
font-weight: bold;
font-size: 29px;
font-family: arial;
padding: 12px;
display: block;
white-space: nowrap;
position: relative;
} I would greatly appreciate any help! Kat |
| |
| | #2 |
| Full Stack Developer Join Date: 2011 Location: Bangkok, Thailand
Posts: 1,142
Thanks: 56
Thanked 206 Times in 183 Posts
|
Where is the link to the page ?
|
| | |
| |
| | #3 |
| Warrior Member Join Date: 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
|
Hello schwarzes! Heres' the link to the page 40 There was a development after I posted the question. I changed the overflow of the main container from 'auto' to 'visible' and that brought the button on top, but now the container won't expand according to the content in it! |
| |
| | #4 | |
| Full Stack Developer Join Date: 2011 Location: Bangkok, Thailand
Posts: 1,142
Thanks: 56
Thanked 206 Times in 183 Posts
|
Add this in your css file and that will be fixed... Code: #deal_single.clearfix:after {
clear: both !important;
} | |
| | ||
| |
| | #5 |
| Warrior Member Join Date: 2012
Posts: 14
Thanks: 5
Thanked 0 Times in 0 Posts
| |
| |
|
| Bookmarks |
| Tags |
| container, div, float, main |
| |