Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-23-2012, 08:27 AM   PM User | #1
Repatilian
Regular Coder

 
Join Date: Jul 2010
Location: Arizona
Posts: 110
Thanks: 14
Thanked 0 Times in 0 Posts
Repatilian is an unknown quantity at this point
Hello, I'm trying to get spacing between my buttons. I'm not sure if its HTML or CSS.

Hello,

I was wondering if anybody could assist me in getting some space between the buttons on my website. The website is www.marksbodyshop.org I tried adding padding, margin, and border elements to the html div tags that have the buttons, but it didn't work. I also tried adding padding, margin, and border elements to the nav, nav a, and nav li parts of the css, but didn't work. Thank you, as any help would be appreciated. I attached the index.html, main.ccs, defult.css, and defult2.css files as one text file named Coding for Marksbodyshop.org.txt.
Attached Files
File Type: txt Coding for Marksbodyshop.org.txt (12.2 KB, 8 views)
Repatilian is offline   Reply With Quote
Old 11-23-2012, 09:42 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,697
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Yeah, no wonder it doesn’t work because you have positioned everything absolutely. With your current set-up you’d need to change the top positions. When I opened Firebug in order to look at your code I noticed that the page is scaling, but not proportionally, rather, it is stretched and squeezed which is not a very good approach. You should use a fixed size layout, especially since you’re using so many non-repeatable graphics.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 11-23-2012, 11:45 AM   PM User | #3
Repatilian
Regular Coder

 
Join Date: Jul 2010
Location: Arizona
Posts: 110
Thanks: 14
Thanked 0 Times in 0 Posts
Repatilian is an unknown quantity at this point
Hi, I tried to use relative and fixed to the position line in my nav element in my main.css. I also tried adding an outline line to the nav, nav li, and nav a elements. I still can't get it to space out. It changed it a little bit, but it's pretty messed up. Check out what it's doing. www.marksbodyshop.org


Thank you
Shane








Here is my main.css code:


html, body {
height:100%;
margin:0;
background-color:#000;
background-image:url(../images/firstpage.gif);
background-size:100% 100%;
background-repeat:no-repeat;
background-attachment:fixed;

border:0;
padding:0;
}
#container {

height:73%;

}
#nav {
position:fixed;
padding:10;
margin:10;
border:10;
outline:10;
list-style-type:none;
height:7%;
width:57%;
top:40%;
left:5%;

z-index:2;
}
#nav li {
width:16%;
margin:10%;
outline:10%;
border:10%;
padding:10%;
height:100%;

}
#nav a {

display:block;
width:100%;
height:100%;
margin:10%;
border:10%;
outline:10%;
padding:10%;
outline:none;
text-indent:-9999px;
background-size:100% 300%;
}

#about {background-image:url(../images/aboutus.png);}
#about1 {background-image:url(../images/contactus.png);}
#about2 {background-image:url(../images/freelunch.png);}
#about3 {background-image:url(../images/map.png);}
#about4 {background-image:url(../images/meettheteambutton.png);}
#nav a:hover {background-position:0 -100%;}
#nav a:active {background-position:0 -200%;}
Repatilian is offline   Reply With Quote
Old 11-29-2012, 10:39 AM   PM User | #4
Repatilian
Regular Coder

 
Join Date: Jul 2010
Location: Arizona
Posts: 110
Thanks: 14
Thanked 0 Times in 0 Posts
Repatilian is an unknown quantity at this point
I got it fixed. I used a method of <ul>'s, and applied the styling to the index.html file itself. Thank you.

Shane
Repatilian is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 05:34 AM.


Advertisement
Log in to turn off these ads.