简体   繁体   中英

Div contents are aligning left to right?

The contents of my Div's are not playing nice.

The items listed under "Browse by Category" are working right, listed vertical as they should be. The "useful links" and "browse by price" are not!

In this picture you can see them, and I marked up in red how they should be. Can anyone help?

Here is my website: http://www.heatx.org/productcart/pc/viewCategories.asp?idCategory=2

在此输入图像描述

your problem is in menu.css on line 8:

ul li {float: left;}

all lis in your site are floated left. You need to specifically target which ones you want to float as you shouldn't float all of them

I think you use this line for your header navigation. If you give the ul for the header nav an id:

<ul id="headerNav">

you can target that ul with

ul#headerNav li {float: left;}

ps. you shouldn't use tables for layout, they are for tabular data only

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM