<li> elements break in IE7

This is a discussion on "<li> elements break in IE7" within the Web Page Design section. This forum, and the thread "<li> elements break in IE7 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 Mar 4th, 2008, 14:13
Junior Member
Join Date: Oct 2007
Location: Holland
Posts: 49
Thanks: 0
Thanked 0 Times in 0 Posts
<li> elements break in IE7

Hi all,

I have the following list in my page:

Code: Select all
<ul class="links">
    <li><a>...</a></li>
    <li><a>...</a></li>
    .....

</ul>
My css is the following:
--------------------------

Code: Select all
ul.links{
    width:198px;
}
ul li{
    margin:0 9px 0 0;
    display:inline;
    list-style:none;
}
ul li a{
    text-decoration:none;
    margin:0;
}
initially, it displays fine in IE, but after I dynamically refresh it (using an AJAX call),
the <li> items spread out in one line only and go beyond the specified <ul> width.

Please give me a hint on what the problem could be.

Thanks!
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 Mar 4th, 2008, 16:17
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,189
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Re: <li> elements break in IE7

Can you try this CSS:-


Code: Select all
ul.links{
    width:198px!important;
}
ul li{
    margin:0 9px 0 0;
    float:left;
    list-style:none; 
}
ul li a{
    text-decoration:none;
    margin:0;
}
Should this not work, try putting the ul element into a sized container.

hth
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
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

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
Easter break unitedcraig Webforumz Cafe 6 Mar 19th, 2008 12:19
We need you to break this tie -- Vote Now! Marc Entry, Nominations and Voting 13 Jan 30th, 2008 14:42
break tag milly Web Page Design 36 Jul 10th, 2007 12:54
Line Break DregondRahl Web Page Design 6 Jun 12th, 2007 15:33


All times are GMT. The time now is 20:58.


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