cash415 Posted March 20, 2011 Report Share Posted March 20, 2011 (edited) Can someone help me with a text layout problem? I'll be using this for eBay, but I also tested it on Firefox and the layout looks weird too. So the problem that I have is the list isn't aligning properly within the black box. For some reason the text starts off from the right instead of left. <div style="float: left; width: 80px; height: 265px; margin: 6px 10px 10px; background-color:blue; padding: 10px;"><ul style="list-style:none; margin:auto; background-color: black; color:white;"><li>test</li><li>test</li></ul></div>Test HTML for eBayLet me know what you guys think. Edited March 20, 2011 by cash415 Link to comment Share on other sites More sharing options...
cousineaug Posted March 20, 2011 Report Share Posted March 20, 2011 Let me know what you guys think.I think you should validate your code before asking for comments. You have no document type declaration so there is nothing to compare against...therefore hundreds of perceived errors.The site looks ok but I am not yet sure what it is supposed to do.Guy Link to comment Share on other sites More sharing options...
dsonesuk Posted March 20, 2011 Report Share Posted March 20, 2011 The reason the text looks as though it is alligning the the right, is because by default the ul tag has padding on the left assigned to it, so you will have to remove this using padding:0; Link to comment Share on other sites More sharing options...
cash415 Posted March 20, 2011 Author Report Share Posted March 20, 2011 thanks! problem solved. on to the next one Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now