Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Vertical Align Problem
Old 07-04-2006, 05:18 AM Vertical Align Problem
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
I've managed the build the button in css but when I repeat the same method for the second button the margin doesnt seem to work right, so there is NO gap.

To view what I mean look here: http://www.mattbuk.com/test/scruples/product_boss.htm

The code on the page for the 2 buttons are

<div id="buttonArea">

<div id="boarder"
onMouseOver="this.style.border='3px double #CCCCCC'; this.style.color='#CCCCCC';"
onMouseOut="this.style.border='3px double #FFFFFF'; this.style.color='#FFFFFF';">
Home
</div>

<br />


<div id="boarder"
onMouseOver="this.style.border='3px double #CCCCCC'; this.style.color='#CCCCCC';"
onMouseOut="this.style.border='3px double #FFFFFF'; this.style.color='#FFFFFF';">
Home
</div>

</div>





and the styles for the id's are

#buttonArea{
left:21px;
top: 216px;
position:absolute;
}

#boarder{
width:114px;
height:20px;
position:absolute;
border: 3px double #FFFFFF;
margin:2px;
display:block;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
color:#FFFFFF;
font-weight:bold;
padding-top:1px;
text-align:center;
cursorointer
}


Any help would be great
__________________

Please login or register to view this content. Registration is FREE

Last edited by mattbuk; 07-04-2006 at 05:21 AM..
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
 
Register now for full access!
Old 07-04-2006, 05:21 AM Re: Vertical Align Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you cannot have two elements with the same ID
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2006, 05:23 AM Re: Vertical Align Problem
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
So should I change the #boarder to .boarder and id="boarder" to class="boarder"?
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
Old 07-04-2006, 05:27 AM Re: Vertical Align Problem
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
Tried that mate and put style="padding-bottom:20px" on the div after the class but still doesnt make a gap just expands the boarder
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
Old 07-04-2006, 05:30 AM Re: Vertical Align Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
yep, and remove the <br> as it will put an extra line break (and therefore a gap) between the <div>s
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2006, 05:39 AM Re: Vertical Align Problem
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
Dont have any gap now

http://www.mattbuk.com/test/scruples/product_boss.htm
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
Old 07-04-2006, 05:45 AM Re: Vertical Align Problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
use margins to control the gap AND GET RID OF THE ABSOLUTE POSITIONING otherwise they will sit on top of each other!!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 07-04-2006, 05:53 AM Re: Vertical Align Problem
Average Talker

Posts: 24
Location: Manchester, England, UK
Trades: 0
Doh I forgot about the position....Padding was a general mistake but its now WORKING - Thanks for the help pal
__________________

Please login or register to view this content. Registration is FREE
mattbuk is offline
Reply With Quote
View Public Profile Visit mattbuk's homepage!
 
Old 07-05-2006, 11:10 AM Re: Vertical Align Problem
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Ok.. enlighten me. You went to the trouble of defining the button with CSS .. so WHY are you using javascript for the mouseOver effect ?? Totally unnecessary, the WHOLE thing, including the hover state, can be done in CSS.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Vertical Align Problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.29933 seconds with 12 queries