Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted line break after hyperlink

Status
Not open for further replies.

brk1221

MIS
Jan 29, 2002
230
0
0
US
Hi, in my html, whenever I insert a hyperlink there is an automatic line break after it. Something in my css style sheet is causing this but I can't figure out what. Here is my css file:

#container {
width: 750px;
margin-right: auto;
margin-left: auto;
}
#header {
height: 150px;
width: 850px;
background-image: url();
}

#content {
width: 600px;
padding: 10px;
margin-right: 120px;
margin-left: 170px;
}
#leftnav {
float: left;
width: 500px;
height: 400px;
background-color: #FFFFFF;
padding: 2px;

}

#leftnav ul
#{
# margin-left: 0;
# padding-left: 0;
# list-style-type: none;
# font-family: Arial, Helvetica, sans-serif;
# font-size: 12px;
#}

#leftnav a
{
display: block;
width: 150px;
padding-top: 1px;
padding-right: 3px;
padding-bottom: 1px;
padding-left: 3px;
border-bottom-width: 1px;
}

#leftnav a:link, .navlist a:visited
{
#color: #0000FF;
#text-decoration: underline;
font-weight: normal;
}

#leftnav a:visited
{
# color: #ffffff;
# text-decoration: underline;
# font-weight: bold;
}

#leftnav a:hover
{
# text-decoration: none;
# color: #D32222;
}

#sidebar {
#padding: 10px;
#float: right;
#width: 130px;
#background-color: #30D9F4;
#height: 390px;

}

#footer {
background-color: #157363;
padding: 2px;
width: 800px;
clear: both;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
}


h1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 22px;
font-weight: bold;
color: #1A2373;
line-height: 24px;
}
h2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 17px;
font-weight: bold;
color: #2F77F1;
line-height: 20px;
}
h3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
font-weight: bolder;
color: #000000;
line-height: 20px;
}

p {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
line-height: 11pt;
margin-top: 3px;
margin-right: 0;
margin-bottom: 3px;
margin-left: 0;
padding-bottom: 9px;
}

a {
color: #0000FF;
font-weight: bold;
text-decoration: underline;
}
a:visited {
color: #E82525;
text-decoration: underline;
font-weight : bold;
}
a:hover {
color: #901BBE;
text-decoration: underline;
}


.box1 {
background:#ffffff;
color: #000;
border:1px solid #00ffff;
width: 400px;
height: 165px;
padding-top: 5;
padding-right: 6px;
padding-bottom: 0;
padding-left: 6px;
line-height: 16px;
}

.smalltext {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
padding: 3px 0;
margin: 3px 0;
line-height: 12pt
}
 
Hi

I am quite sure, not all links, only those inside #leftnav . Well, you set their [tt]display[/tt] to [tt]block[/tt] and that is the standard behavior of the [tt]block[/tt] elements.

( By the way, comments in CSS are delimited with [tt]/*[/tt]..[tt]*/[/tt] . )

Feherke.
 
Thanks, using the /* */ instead of # in the #leftnav ul section fixed the problem
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top