Webmaster Forum


Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Share |
  #1 (permalink)  
Old 03-21-2006, 11:46 AM
JuggoPop's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-09-03
Posts: 4,284
iTrader: 0 / 0%
Formatting <ul> spacing in css???

See attached image.

#1 is the way the list shows now.

#2 is the way it should be.

the code is just a plain list as follows:

Code:
Menu: <ul> <li>About Us</li><br /> <li>How We Can Help</li><br /> <li>Contact Us</li><br /> </ul>
All formatting is done in my style sheet... bg image, dispaly inline, and some other jazz.

My problem is, I can't figure out how to format the <ul> tag so that it will get rid of the space between "menu" and the first <li> tag.

I know I could just do it by getting rid of the <ul> all together, I have done that before, and it works... it's just sloppy. I'd rather do it correctly if anyone knows of something that works on all browsers (even if it's off a little, as long as it's not as much as is now)...

Any help would be great. (I have searched google for an hour now and tried many things that are supposed to work... but don't)
Attached Thumbnails
Formatting <ul> spacing in css???-list-help.gif  
 
Reply With Quote
  #2 (permalink)  
Old 03-21-2006, 11:48 AM
JamieJelly's Avatar
Contributing Member
Latest Blog:
None

 
Join Date: 03-09-06
Posts: 1,250
iTrader: 0 / 0%
is the word menu in a <p> tag or <h> tag? Try setting the padding of that element to a lower figure
 
Reply With Quote
  #3 (permalink)  
Old 03-21-2006, 11:52 AM
JuggoPop's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-09-03
Posts: 4,284
iTrader: 0 / 0%
It's not. It's just plain text in the same <div> tag as the list.
...& No line breaks or anything behind it.

by default there is some spacing as an indent on a list,... and there is also a "top padding" indent (for lack of a better term) that happens as well.

I can control the left indent in css, but this top one is giving me hell.
 
Reply With Quote
  #4 (permalink)  
Old 03-21-2006, 11:59 AM
Brian's Avatar
Super Trooper
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 4,819
iTrader: 0 / 0%
Put the word "menu" right after the <UL> tag.

If I remember correctly...
__________________
badum tish.
 
Reply With Quote
  #5 (permalink)  
Old 03-21-2006, 12:00 PM
JuggoPop's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-09-03
Posts: 4,284
iTrader: 0 / 0%
ok... but then that will add space above it?... will it not?

Menu is actually going to be replaced with something else all together, I just need the spacing gone...
 
Reply With Quote
  #6 (permalink)  
Old 03-21-2006, 12:03 PM
Brian's Avatar
Super Trooper
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 4,819
iTrader: 0 / 0%
Have you tried setting a margin-top attribute for UL in the css?
__________________
badum tish.
 
Reply With Quote
  #7 (permalink)  
Old 03-21-2006, 12:09 PM
JuggoPop's Avatar
Senior Member
Latest Blog:
None

 
Join Date: 10-09-03
Posts: 4,284
iTrader: 0 / 0%
you da man...

I thought I had tried that (I really did)... but I guess I hadn't because I just added it in again and it worked.

Thanks buddy.
 
Reply With Quote
  #8 (permalink)  
Old 03-21-2006, 12:11 PM
Brian's Avatar
Super Trooper
Latest Blog:
None

 
Join Date: 10-12-03
Posts: 4,819
iTrader: 0 / 0%
NP.
__________________
badum tish.
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Formatting Question... CheebaHawk Web Design Lobby 1 09-29-2006 03:34 AM
Formatting Hard Drives King Justice Tech Talk 14 07-09-2006 06:59 PM
H1 spacing GeXus Coding Forum 4 08-04-2004 10:23 AM
Microsoft Word Formatting wbstein Graphic Design Forum 4 05-10-2004 12:01 PM
Help with Frongpage formatting... fosho flash Web Design Lobby 10 12-02-2003 03:40 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 11:37 PM.
Powered by vBulletin
Copyright © 2000-2013 Jelsoft Enterprises Limited.
Copyright © 2003 - 2013 Escalate Media LP




Search Engine Optimization by vBSEO 3.6.0 RC 2 ©2011, Crawlability, Inc.