problem with floating list

This is a discussion on "problem with floating list" within the Web Page Design section. This forum, and the thread "problem with floating list are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 6th, 2006, 16:23
New Member
Join Date: Jul 2006
Location: uk
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
problem with floating list

hello to all i have a problem with this list and its doing my head in.
the problem is the list menu works fine until imake it float left. then the list-style-type: square disappears can anybody explain this to a newbee in css, code below

css code
Code: Select all
 
#menutop ul{
list-style-type:square;
}  
#menutop li{
float:left; // remove this line and the squre appears
padding-right:15px;
} 
#menutop li a{
font-size:12px;
font-family:"Verdana";
font-weight:bold;
color:#666666;
text-decoration:none;}
#menutop li a:visited{
color:#666666;
}
#menutop li a:hover{
color:#60A3D0;
}
html code
Code: Select all
<body>
<div id="menutop">
<ul>
  <li><a href="#">john</a></li>
  <li><a href="#">newsome</a></li>
</ul>
</div>
</body>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 6th, 2006, 16:31
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem with floating list

Tried your code.

I see the marker in IE, Firefox and Opera.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 6th, 2006, 16:40
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: problem with floating list

if not, make sure li have left margin (which is the space used for the squares)
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 7th, 2006, 08:24
New Member
Join Date: Jul 2006
Location: uk
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem with floating list

thanks for that ive tried the margin but an still only get the square to show up in ff not ie am i missing something or does css code not universal

thanks again
john
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 7th, 2006, 14:56
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: problem with floating list

CSS is universal but IE can be a real bitch sometimes. Can we have a URL? or even some screenshots?
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 7th, 2006, 15:23
New Member
Join Date: Jul 2006
Location: uk
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem with floating list

http://www.testreg8.co.uk/testcss/
thats the url it dont show much just my name and the problem with ie

thanks
john
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jul 7th, 2006, 16:00
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: problem with floating list

ooooherrr! wierd problem!

I honestly don't know what to suggest... I'll do some home work on it though and see what I can come up with.
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jul 7th, 2006, 16:10
New Member
Join Date: Jul 2006
Location: uk
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem with floating list

tell me about it seems that css is going mad in ie just lately ive got problems coming out of my ears.

thanks
john
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jul 8th, 2006, 09:20
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
Re: problem with floating list

DAMN! I cannot make it work!!!!!!

I think I understand the look you want and I used a background image:
http://www.123cleaners.com
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Jul 10th, 2006, 08:50
New Member
Join Date: Jul 2006
Location: uk
Age: 36
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Re: problem with floating list

thanks for all the help sorry ive taken so long to get back to you all but ive been away for the weekend.
thanks again
john
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Jul 11th, 2006, 13:29
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: problem with floating list

You need padding on the left of the li to show the bullet image. i.e. padding: 0 0 0 14px; or something. alternately you can use a background image on the li vs a standard bullet i.e.

background:url("foo.jpg") center left no-repeat;
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Jul 11th, 2006, 13:30
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: problem with floating list

Forgot to mention, display:inline; negates a lists style. So you will need to use a background image. or float them left in which case you will need a clear element to keep the content below it. Problem is if you go the float method you won't be able to center the ul with text-align:center; etc. I would search www.alistapart.com and find a method of implementation that is right for your needs. FF is a lot nicer to people than say safari. Safari from what I know is much more strict in its css parsing. e.g. color: FFF; will work in FF but safari requires color:#fff;. etc etc.. As for IE, well it is just a sloppy piece of cow poo.

Edit: As I read his code wriong he is using float:left so the padding may fix it. I need coffee.


Here is a snippet from the nav in one of my sites which uses a background image for a bullet. Bold shows the image placement:

/* side bar link and list styles */
#sidebar ul {
padding: 0;
margin: 0;
}

#sidebar li {
list-style-type: none;
border-bottom: 1px solid #FFF;
}

#sidebar li.sideheading {
padding: 12px 6px 12px 0;
background-color: #003E81;
color: #FFF;
font-weight: bold;
text-align: center;
}

#sidebar li a {
display: block;
color: #003E7E;
font-weight: bold;
padding: 6px 6px 6px 28px;
text-decoration: underline;
background: #EEECE1 url(../images/texas_bullet.gif) center left no-repeat;
}


#sidebar li#sidecurrent a {
color: #FFF;
background-color: #A81A18;
text-decoration: none;
}

#sidebar li a:hover {
color: #A81A18;
background-color: #E5E3D4;
text-decoration: underline;
}
/* end sidebar link and lists tyles */
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)

Last edited by moojoo; Jul 11th, 2006 at 14:08.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Jul 11th, 2006, 13:33
minute44's Avatar
Most Reputable Member

SuperMember
Join Date: Apr 2006
Location: Nottingham UK
Age: 25
Posts: 1,351
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: problem with floating list

Quote:
Originally Posted by moojoo
You need padding on the left of the li to show the bullet image. i.e. padding: 0 0 0 14px; or something. alternately you can use a background image on the li vs a standard bullet i.e.

background:url("foo.jpg") center left no-repeat;
I have a feeling that you're probably right here (as a designer, I walk in your freakin shadow) but this isn't normal behaviour is it? I mean, I've never experienced anything like this and I use CSS lists quite a lot.

Do you know something from a past experience or something?
Last Blog Entry: Annoying people.... (Jan 16th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Jul 11th, 2006, 13:54
Elite Veteran
Join Date: Aug 2005
Location: That Place
Posts: 2,044
Blog Entries: 1
Thanks: 0
Thanked 37 Times in 37 Posts
Re: problem with floating list

I know nothing! heh

Quote:
Originally Posted by minute44
Do you know something from a past experience or something?
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
problem, floating, list

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
floating divs problem in IE r0ck80y Web Page Design 4 May 19th, 2008 14:43
having problem floating elements danny322 Web Page Design 1 Jan 14th, 2008 16:45
First image problem and inline list problem konnor5092 Web Page Design 8 Dec 1st, 2007 09:08
Problems floating a list, as well as some other issues! blizeH Web Page Design 7 Oct 14th, 2006 20:13
Problem with a floating layer. derdeb Web Page Design 7 Jul 8th, 2005 18:22


All times are GMT. The time now is 18:00.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42