Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Small Line Under Text
Old 09-08-2008, 01:15 AM Small Line Under Text
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
I recently created a roll over effect with a div and it's containing text. This could be seen Here

The part at question is the Shared | Reseller bit under the first black gradient rectangle. My problem is that there's a dark line under the text. It's not the underline effect, as it is much too close to it, and I've also tried to enable "text-decoration: underline;" command. In this case, both lines pop up.

I really don't know what the cause of this could be. Any help is greatly appreciated.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
 
Register now for full access!
Old 09-08-2008, 04:24 AM Re: Small Line Under Text
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
you can't have BOTH of these
Code:
   <div id=catshared>
   <a href=shared.php> <h1 class=catshared><span class=catshared><br>
Shared Web Hosting </span></h1> </a> 
      </div>
(id=catshared & class=catshared)

it needs a proper DTD

the multiple <!-- -->s need to be removed from the style sheets

for a start

the line appears to be the body background showing though a gap in the layout BTW change the colour in the body to test it
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-08-2008, 08:38 AM Re: Small Line Under Text
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
I've changed those up as you've suggested and have tried that background-color switch for the body element, and it doesn't seem to be the cause.

When I switched the body color to blue, the line under the text was still just as visible.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 09-08-2008, 03:20 PM Re: Small Line Under Text
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You also should NOT wrap an H1 inside an <a></a> tag. You must put the link inside the H1.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 04:11 PM Re: Small Line Under Text
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
Yeah, I changed that after figuring out that it doesn't validate, earlier this morning. However it doesn't appear to be the problem either.

Here's the code in question:
Code:
  <div id=catshared>
    <h1 class=cattextshared><a href=shared.php><span class=cattextshared><br>
Shared Web Hosting </span> </a> </h1>
      </div>


and the CSS:

Code:
#catshared{

font-family:Arial;      
float:left;
height: 25px;
width: 323px;


}


a .cattextshared {

color: #5b97b1;
padding-bottom: 10px;
text-align: center;
background:url(new/catleft2.jpg) no-repeat;
display: block;

}

a:hover .cattextshared   {

color: #FFFFFF;
background:url(new/catlefta.jpg) no-repeat;
}


h1.cattextshared {
font-size:14px;
}
I have another set of code for the other button, but it basically consists of the same code, with different ID and Class names.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 09-08-2008, 04:30 PM Re: Small Line Under Text
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
a .cattextshared {

color: #5b97b1;
padding-bottom: 10px;
text-align: center;
background:url(new/catleft2.jpg) no-repeat;
display: block;

}
That isnt' going to work with this:
Quote:
<a href=shared.php><span class=cattextshared><br>
Shared Web Hosting </span> </a>
..because .cattextshared isn't applied to the <a> but to the <span>. Why do you need the span anyway ? Put the class on the <a> and be done with it.

<a class="cattextshared" href="shared.php">Shared Web Hosting</a>



__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-08-2008, 06:21 PM Re: Small Line Under Text
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
Looks like that did it! Here's the final HTML:

Code:
   <div id=catshared>
    <h1 class=cattextsharedh1><a href=shared.php class=cattextshared><br>
Shared Web Hosting </a> </h1>
      </div>
and the CSS:
Code:
.cattextshared {
padding-bottom: 10px;
text-align: center;
background:url(new/catleft2.jpg) no-repeat;
display: block;       
}

a.cattextshared:link {color: #5b97b1; text-decoration:none;}

a.cattextshared:active {color: #5b97b1;text-decoration:none; }

a.cattextshared:visited {color: #5b97b1;text-decoration:none; }

a.cattextshared:hover {color: #FFFFFF; background:url(new/catlefta.jpg) no-repeat; text-decoration:none;}
Thanks a bunch!
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Old 09-08-2008, 09:11 PM Re: Small Line Under Text
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You're welcome, glad that solved it
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Small Line Under Text
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27329 seconds with 12 queries