Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Shifting links (move when clicked) Re: Shifting links (move when clicked)

#72709
Rob MacKay
Participant

the difference between block and inline are that block elements can have a height and a width and are normally rendered under each other when they are siblings. You can change the way a block element behaves by using the inline-block definition which will have them display as a block element and behave like an inline element.

In-line elements are more about wrapping text, for example a anchor <a> would be normally used within a line of text to create a link. <span> is the in-line equivalent of the general <div> block tag. In-line elements do not render under each other when they are siblings, and are normally used to change text rather than build site structure.

you define them like this:

display:block;
display:inline-block;
display:inline;

this is what I did to just fix the list itself. The reason I used a float is because of IE7 and its reluctance to see display:inline-block;

Code:
.book-categories ul li {
float:left;
font-size:12px;
list-style:none outside none;
margin:12px;
text-align:center;
}
Code:
.clear {
clear:both;
margin:0;
padding:0;
{
Code:
.active a {
background:none repeat scroll 0 0 #000000;
color:#FFFFFF;
text-decoration:none;
{

Do you have any links to the actual action the script is meant to perform? :)