Jump to content

Listing


soccercory7

Recommended Posts

Ok when I do a listing like with bullets or #'s it putts them like there supposed to be but the bullets arent straight up and down, they are moved pending the length of the word.The HTML is<center><ul> <li>Soccer</li> <li>Wrestling</li> <li>Basketball</li></center></ul>But if i dont center it it works<ul> <li>Soccer</li> <li>Wrestling</li> <li>Basketball</li></ul>But i want it centered

Link to comment
Share on other sites

that's because it centers the center of your text, not the beginning. try this css:
position:relative; left:50%;

LG

I don't know where or how to add that in i dont know how to use css's yet. copy my post HTML and put that in it then post it so i c what it looks like please
Link to comment
Share on other sites

ok, instead of this:

<center><ul>  <li>Soccer</li>  <li>Wrestling</li>  <li>Basketball</li></center></ul>
use this:
<div style="position:relative; left:50%;"><ul>  <li>Soccer</li>  <li>Wrestling</li>  <li>Basketball</li></ul></div>

if you need to, higher or lower the percentage.actually, I just remembered another way:

<div style="margin:0 auto;">

but for some reason it doesn't work for me. :) go with the 50% one. :) LG

Link to comment
Share on other sites

Hey, Thanks that worked great LT... and i think i got my signature working now and 1 more thing u know that picture of a goat u have on the sides of ur posts how do i get my photo there, whats it called

Link to comment
Share on other sites

actually, I just remembered another way:
<div style="margin:0 auto;">

but for some reason it doesn't work for me. :)   go with the 50% one. :) LG

The reason it doesn't work for you is because you're using IE. You say IE is fine, but it really isn't. :)Here is a way to align a div in all browsers:<body style="text-align: center;"><div style="margin: 0 auto; text-align: left;">Text here...</div></body>IE doesn't recognise the "auto" value on margin, so you'll need to (wrongly) use "text-align: center;" (which should really only be used for text within the element and text in child-elements) on body. Then, for the other browsers (which is the way it should be done), you add "margin: 0 auto;" to give the div the same margin on the right and left, and otherwise 0 for top and bottom. Then, because the div inherits parent-element css ("text-align: center;"), you'll need to counter that by using "text-align: left;".
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...