Connecting Tech Pros Worldwide Forums | Help | Site Map

Css Link Help: get rid of line break

Newbie
 
Join Date: Aug 2008
Posts: 4
#1: Aug 27 '08
Hi People.

I'm new to this forum, signed up just now as Im in need of some help.

i have made a link within css, with a style that highlights the background on rollover. i have included 'display:block;' within the CSS, but it inserts a line break.

does anybody know how to get rid of this line break?
is there a different option other than the one i have done.

here is a screenshot of what i mean....


" border="0">


acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Aug 27 '08

re: Css Link Help: get rid of line break


Welcome to Bytes!

You're probably looking for "display: inline" instead of "display:block". If that doesn't solve it, post your code.
Newbie
 
Join Date: Aug 2008
Posts: 4
#3: Aug 27 '08

re: Css Link Help: get rid of line break


that just highlighted the text as far as the word length, and not the entire width.

here is the hover style for the link;

Expand|Select|Wrap|Line Numbers
  1. a.print:hover {
  2. color:#FFFFFF;
  3. background-color:#429F00;
  4. display:block;
  5. float:left;
  6. }
which lives in a div tag, with the code, as follows;

Expand|Select|Wrap|Line Numbers
  1. #video{
  2. position:absolute;
  3. width:75%;
  4. left:5px;
  5. top:4%;
  6. height:9%;
  7. font-family:"Georgia", Times New Roman, Times, serif;
  8. background-color:#FBD769;
  9. color:#FFFFFF;
  10. font-size:58px;
  11. text-align:right;
  12. font-weight:bolder;
  13. }
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#4: Aug 27 '08

re: Css Link Help: get rid of line break


What about the relevant HTML code?
Newbie
 
Join Date: Aug 2008
Posts: 4
#5: Aug 27 '08

re: Css Link Help: get rid of line break


ha, yeah, that would help wouldn't it........

Expand|Select|Wrap|Line Numbers
  1. <div id="column1"><a href="index.html" class="about">About Me</a>
  2. <br /><a href="pages/photo.html" class="photo">Photography</a>
  3. <br /><a href="pages/video.html" class="video">Film & Video</a>
  4. <br /><a href="pages/print.html" class="print">Print</a> </div>
Newbie
 
Join Date: Aug 2008
Posts: 4
#6: Aug 27 '08

re: Css Link Help: get rid of line break


no problem now....

I have it sorted :D

thanks though.
I will continue to use this forum for help though :D
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#7: Aug 27 '08

re: Css Link Help: get rid of line break


What was the problem/solution in the end? I do notice that you have <br> tags in your HTML.
Reply