Jump to content

Styling a List


millsy007

Recommended Posts

I am having real trouble styling my list, no matter what combo of css tags I use I cant seem to get it to display how I want!

I want my list to display horizontally and to have no bullet points.

 

.clearfix {display: inline-block;}
#new_prod_wrap li {list-style:none}

 

<ul class="new_prods_wrap clearfix">
<li class='new_prod_wrap first' style='width:180px'>
<a href='' rel=><img src=''/></a>							
<div class="teaser">
<h5 class="prod-title"><a href="">Poole Pottery Plate</a>
</h5><p class="price_value"><span class="price solo">£95.00</span></p><!-- price_value -->
</div>
</li>
</ul>

 

Thanks for any pointers on where I am going wrong

Link to comment
Share on other sites

a few things.

 

use display:inline;

 

second.

 

Your assigning properties to an #id in your style sheet while you meant a class

so change # with a dot (.classname) (ie. .new_prod_wrap )

 

I would also recommend to remove all your inline style. just place all style in an external stylesheet. It's much cleaner and more efficient.

Link to comment
Share on other sites

Hi

 

I removed the clearfix part set list to inline and changed it to be a class, so just have:

(i have a stylesheet but just showing relevant bits)

 

.new_prod_wrap li {display: inline;
list-style-type: none;
padding-right: 20px;}

 

<ul class="new_prods_wrap">
<li class='new_prod_wrap first' style='width:180px'>
<a href='' rel=><img src=''/></a>							
<div class="teaser">
<h5 class="prod-title"><a href="">Poole Pottery Plate</a>
</h5><p class="price_value"><span class="price solo">£95.00</span></p><!-- price_value -->
</div>
</li>
</ul>

 

It is still formatted the same?

Link to comment
Share on other sites

It is still formatted the same?

you have a question mark, after your statement. I think you want to say it's not working and it still looks the same right?

 

DO you have an on-line example of this it might very well be that some other things are interfering?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.