6 replies [Last post]
earph
earph's picture
Offline
Enthusiast
Austin, TX
Last seen: 12 years 46 weeks ago
Austin, TX
Joined: 2003-11-12
Posts: 62
Points: 0

I need the width set because I'm rolling the background of my links. It works fine in IE6, but not working in Firefox or Netscape.

I noticed with Firefox, setting the right padding of the link would extend it the width of my column, but I can't do that because each button is a different size and I would have to have a seperate setting for each individual link. Sad

Is there any other solution?

#subRight ul { list-style-type: none; margin: 15px 0 0 11px; padding: 0;}
#subRight li { margin: 0; padding: 0; }
			
#subTitle 	{
	font: bold 15px arial, verdana, sans-serif;
	color: #cc6600; text-decoration: none; }
	
#subTitle:link {
	text-decoration: none;
	padding: 4px 0 4px 5px; width: 189px; }
	
#subTitle:hover {
	text-decoration: none; padding: 4px 0 4px 5px; background-color: #fff; }
					
#subNavDivider { background: url(graphix/subNavDivider.gif) no-repeat; }
					
#subNav { font: bold 11px verdana, arial, sans-serif; color: #996600; }
	
#subNav:link {
	text-decoration: none;
	padding: 4px 0 4px 5px; width: 189px; }
	
#subNav:hover {
	text-decoration: none;
	padding: 4px 0 4px 5px; background-color: #fff; }

Sample: http://www.expresiv.com/new/solutions/index.asp

Check out the right navigation.

I appreciate the help!

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 12 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Link Width Not Working in Firefox / Netscape

Hi

I can see that, As I type, your style sheet has just changed!

It went from wide backgorund to fit the link instead. Did you use span (making it display:block)?

Anyway, it's clear you're on the way there. At this time, the main link is underlined and the hover isn't, but I am sure you'll crack it soon.

Trevor

earph
earph's picture
Offline
Enthusiast
Austin, TX
Last seen: 12 years 46 weeks ago
Austin, TX
Joined: 2003-11-12
Posts: 62
Points: 0

Link Width Not Working in Firefox / Netscape

Yeah, you'll notice that it's working now in IE6, but not in Mozilla. Are you seeing the same error on your end? IE6 will span the entire background, but Mozilla won't.

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 12 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Link Width Not Working in Firefox / Netscape

skillet wrote:
Yeah, you'll notice that it's working now in IE6, but not in Mozilla. Are you seeing the same error on your end? IE6 will span the entire background, but Mozilla won't.

Hi

Yes, I see what you mean. That is becasue the width attribute hasn't inherited inwards past the link. I think you need display:block on the links.

The (more complex) example I have here:

http://207.44.137.103/stus_buttons.html

Has full width and uses display:block to do it.

Trevor
PS, get rid of:

<?xml version="1.0" encoding="iso-8859-1"?> unless you really need it. It throws IE into quirks mode.

earph
earph's picture
Offline
Enthusiast
Austin, TX
Last seen: 12 years 46 weeks ago
Austin, TX
Joined: 2003-11-12
Posts: 62
Points: 0

Link Width Not Working in Firefox / Netscape

"Display: block" worked really well, but now it's jacking up IE. It's putting extra space between my line items now... even though I have margins and padding set to 0.

Have you ever encountered this glitch? It's happening somewhere in here:

#subRight {
width: 210px; float: right; padding: 0; }

#subRight ul {
list-style-type: none; margin: 0; padding: 0; }

#subRight li { margin: 0; padding: 0; }
			
#subTitle 	{
font: bold 15px arial, verdana, sans-serif;
color: #cc6600; display: block; }

#subTitle:link {
text-decoration: none;
padding: 4px 0 4px 5px; display: block;  }

#subTitle:hover {
text-decoration: none; padding: 4px 0 4px 5px;
background-color: #fff; }

Example here: http://www.expresiv.com/new/solutions/index.asp

Thanks!!

bishal
Offline
newbie
Last seen: 13 years 43 weeks ago
Joined: 2008-03-26
Posts: 1
Points: 0

help me

i have this css

.adminAddPNo
{
padding:8px 8px 8px 8px;
border:solid 1px #663333;
color:#663333;
background-color:#6699CC;
width:320px

}

n has apsx

td style="text-align:center">
div class="adminAddPNo" >
asp:Image ID="Image3" runat="server" Height="240px"
ImageUrl="~/Images/F1TopView.PNG"
Width="320px" />
/div>
/td

but it works well in IE7 but not in firefox
plz help! me!
in firefox pics goes to left but in IE7 it appears in center

i knw that error was in css width whr if i put width=auto it works
but i need to have box not full width !!!
HELP !!

isedeasy
Offline
Enthusiast
Bristol
Last seen: 9 years 30 weeks ago
Bristol
Timezone: GMT+1
Joined: 2008-02-09
Posts: 74
Points: 12

Why dig up a 4 year old

Why dig up a 4 year old thread?

I suggest starting a new thread, making sure all your code validates and the post it all in between code tags...

"If a man is trying to hang himself from the tree in my yard but the knot keeps slipping and allowing him to fall before it kills him do you expect someone to go out and teach him to tie a better knot?" - Triumph