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 12-07-2012, 10:44 PM   PM User | #1
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Spacing Images apart in a <ul>

If you take a look at this site here:

http://tinyurl.com/cu6m5t6

Notice the top menu (home, bikes, my account, etc).

Those are basically just .png images in a <ul>

However, I would like to space those images out horizontally, so the menu should take up about 50% of the width of that entire bar.

Is there a simple way to do this in CSS, or should I just recreate the images themselves with wider dimensions to space it out?

Thanks!
BlackReef is offline   Reply With Quote
Old 12-08-2012, 12:50 AM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello BlackReef,
I'm not sure why you have that menu nested in 3 containing elements, #menu, #mainMenu and #electraMenu. Have a look at divitis and how to avoid it.

You also have heights and widths of containing elements set too small to contain the elements you've placed in them. Your menu is much taller than 11px so I'm not sure why .mainMenu would be that hight.

To space out your li elements, just use some margin... something like this -
Code:
.menu ul li a {
    color: #FFFFFF;
    float: left;
    margin: 0 20px;
    padding-left: 11px;
    padding-right: 11px;
    text-decoration: none;
}
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Users who have thanked Excavator for this post:
BlackReef (12-11-2012)
Old 12-11-2012, 12:23 AM   PM User | #3
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Thanks Excavator! Ya Im working with an older system that has been through several revisions before my time. I just want to massage the CSS for now until we start with a new ecommerce platform. There is a ton of junk CSS/code

Thanks again!
BlackReef 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 04:47 AM.


Advertisement
Log in to turn off these ads.