I am redesigning my old html tables design to a strict xhtml and css tableless design. I am having some problems. First, the top menu links aren’t verticly aligned right and i cant fix it. I want the links in the middle. Second, The side menu wont go down all the way to the bottom. I have tried height: 100%; and height: auto; and a couple other things but it doesnt affect it. I will post more problems as i encounter them. I am trying to make it look almost exaclty like the old one, but better.
New underconstruction design: [URL]http://www.mystupidcrap.com/scott/index2.php
Old table design: [URL]http://www.mystupidcrap.com/scott/index.php
<i>
</i><style type="text/css"><!--
#menu{
text-align:center;
list-style-type:none;
margin:0;
padding:0;
background-color:#232323;
border-bottom:1px solid #4c4c4c;
}
#menu li{
display:inline;
margin:0;
padding:0 10px;
line-height:2em;
}
--></style>
<p style="position:absolute;top:-99999px;left:-99999px;"><a href="#primarycontent">Skip navigational links.</a></p>
<ul id="menu">
<li><a href="index.php">Home</a></li>
<li><a href="index.php">Province</a></li>
<li><a href="index.php">Kingdom</a></li>
<li><a href="index.php">Guild</a></li>
<li><a href="index.php">Help</a></li>
<li><a href="index.php">Players Guide</a></li>
</ul>
I have also slipped in a skip nav link for benefit of users with screen readers, they don't want to sit through a list of links every time they load a page.[i]Originally posted by BlackDragon1012 [/i]Other tags can do the same job. <div> tags aren't magic you know. ?
[B]1. My div tag does do stuff it makes the backgrounds and the layout[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]The layout I uploaded is pretty much exactly what yours is like, stuff at the top and then two columns, sound familiar? In the layout I uploaded though, the side-bar comes after the main content in the source (and since the main content is more important, this makes sense).
[B]3. I dont know why you are giveing my this layout its nothing like the one im trying to make and it doesnt even fix any of my problems.[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]You should forget about giving the <ul> a height, and instead let the height be set via the text, if you allow the text to expand by using relative font sizes (and you should) then the bar should change height as well. I gave the text in the <li>'s a line height of twice the font-size (2em) which pretty much vertically aligned them, you could tweak that with padding on the <ul> to make it perfect.
[B]4. After i put the links in an unordered list they are still not verticly aligned right.[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]Height 100% will only make the element as tall as it's parent element, therefore it will not work. Doed
[B]5. Do you have any ideas on the height of my side bar thing [/B][/QUOTE]
<div id="menu">
<ul>
<li><a href="index.php">Home</a></li><li><a href="index.php">Province</a></li><li><a href="index.php">Kingdom</a>
</li><li><a href="index.php">Guild</a></li><li><a href="index.php">Help</a></li><li><a href="index.php">Players Guide</a></li></ul>
</div>
To this:<ul id="menu">
<li><a href="index.php">Home</a></li>
<li><a href="index.php">Province</a></li>
<li><a href="index.php">Kingdom</a></li>
<li><a href="index.php">Guild</a></li>
<li><a href="index.php">Help</a></li>
<li><a href="index.php">Players Guide</a></li>
</ul>
Then apply your styles to the <ul id="menu"> rather than the <div id="menu">.[i]Originally posted by BlackDragon1012 [/i]I wasn't talking about the side-bar menu, I was taking about the top nevigation bar menu. You have a ul in a div tag, and you don't need the div tag.
[B]i cant do that because everything on the side bar isnt going to be a list.[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]So then I suggest a 1px by 1px square set as a background to the body, you can set it to repeat-y and use background-position to get it into the right place.
[B]if neither of the main content goes to the bottom or the sidebar then it wont go to the bottom.[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]Set the <p> tag to display:inline;
[B]Do you know how i can get the border i put on the <p> in the main content section to only go as long as the <p> and not the whole screen[/b][/quote]
[i]Originally posted by BlackDragon1012 [/i]A little bit, mainly because all of the content underneath moves up a pixel.
[B]On an unrealated topic is the size change of the links on the right side annoying.[/B][/QUOTE]
So then I suggest a 1px by 1px square set as a background to the body, you can set it to repeat-y and use background-position to get it into the right place.[/QUOTE]
Set the <p> tag to display:inline;[/QUOTE]
By the way, I notice that all of your side-bar comes before the main content now. ?[/QUOTE]
background:#000 url(square.gif) repeat-y;
background-position:180px 0;
But make sure that there's nothing covering the line up, background colours of elements will hide what is underneath them, if the line is hidden, try removing background colours from things and allow the background colour of the body to fill in the gaps.0.1.9 — BETA 5.28