CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 9th, 2008, 06:55 AM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 738 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 23 h 8 m 51 sec
Reputation Power: 5
Link problem - not lining up in FF

Hi there,

I have a drop down menu which I want to display next to another link to the right of the page (so there is a link to the far right and then the drop down to the left of the right link), however the drop down link is appearing under the far right link in FF, instead of beside it like it is in IE.

Any ideas what I have wrong?

This is my CSS:
PHP Code:
#tools{
text-align:right;
padding-right20px;
}

#add_business{
background-imageurl('images/add_business.png');
height21px;
width156px;
float:right;
text-align:center;
padding-top4px;
}

#add_business a:link{
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#ffffff;
text-decoration:underline;
}

#add_business a:hover{
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#ffffff;
text-decoration:none;
}


#com_tools{
text-alignright;
margin-right200px;
margin-top0px;
float:right;
}


#menu ul .item{
display:none;
list-
style:none;
list-
style-image:none;
}

#menu ul:hover .item{
display:block;
list-
style:none;
list-
style-image:none;
}

#menu{position:absolute;
list-style:none;
list-
style-image:none;



and this is my HTML:
PHP Code:
<div id="tools">


<
div id="com_tools">
<
div id="menu">
<
ul id="item1">
<
li class="top">Community Tools</a> <img src="templates/images/arrow_down.gif" /></li>
<
li class="item"><a href="#">menu item 1</a></li>
<
li class="item"><a href="#">menu item 2</a></li>
<
li class="item"><a href="#">menu item 3</a></li>
</
ul>
</
div
</
div>

<
div id="add_business"><a href="#">Add Your Business!</a></div>
</
div

Reply With Quote
  #2  
Old May 9th, 2008, 07:12 AM
GameYin GameYin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Whiteford, MD
Posts: 348 GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 11 h 54 m
Warnings Level: 5
Reputation Power: 60
Send a message via AIM to GameYin
MySpace
Website please. Also, try validating your page.
w3.validator.org
http://jigsaw.w3.org/css-validator/
__________________
Adwords Professional
You can give me

Reply With Quote
  #3  
Old May 9th, 2008, 07:51 AM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 738 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 23 h 8 m 51 sec
Reputation Power: 5
It is currently offline

Reply With Quote
  #4  
Old May 9th, 2008, 07:53 AM
GameYin GameYin is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Location: Whiteford, MD
Posts: 348 GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level)GameYin User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 3 Days 11 h 54 m
Warnings Level: 5
Reputation Power: 60
Send a message via AIM to GameYin
MySpace
You can still validate. Get back to us.

Reply With Quote
  #5  
Old May 9th, 2008, 07:58 AM
essee essee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 82 essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 7 h 27 m 10 sec
Reputation Power: 12
You have a stray </a> in

Code:
<li class="top">Community Tools</a> <img src="templates/images/arrow_down.gif" /></li>


Did you forget the opening tag?

Also you have the order of your floats backwards I think.

The one you want on the far right should go first, so swap them around. Then you can remove the 200px right-margin from com_tools.

At least I think thats what your after.

Edit: oh yeah, and what Gameyin said ^^

Last edited by essee : May 9th, 2008 at 08:01 AM.

Reply With Quote
  #6  
Old May 9th, 2008, 08:14 AM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 738 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 23 h 8 m 51 sec
Reputation Power: 5
Thanks. I have validated the CSS and the only invalid thing is the cursor:hand

I have also made those changes essee, but the problem is still there.

This is a screenshot of what I mean: http://www.upload3r.com/serve/090508/1210338753.jpg

The IE version is the correct one.

Reply With Quote
  #7  
Old May 9th, 2008, 08:53 AM
essee essee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 82 essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 7 h 27 m 10 sec
Reputation Power: 12
Hmm it might be that it's just late here but those 2 look fairly similar to me in respect to your original post.

You have a drop down and then your link in both.

Are they the wrong way around?

Also if you've made changes to the code it will help us if you repost the new code so we don't have to look at the old code and wonder exactly what you have changed.

Last edited by essee : May 9th, 2008 at 08:54 AM. Reason: Typo - It's late OK :)

Reply With Quote
  #8  
Old May 9th, 2008, 08:57 AM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 738 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 23 h 8 m 51 sec
Reputation Power: 5
If you look at the IE screenshot, the 'Community tools' Link is in line with the blue link on the right side, where as in FF, it is below that link. IE is how I want it.

This is my new CSS:
PHP Code:
#tools{
padding-right20px;
}

#add_business{
background-imageurl('images/add_business.png');
height21px;
width156px;
float:right;
text-align:center;
padding-top4px;
}

#add_business a:link{
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#ffffff;
text-decoration:underline;
}

#add_business a:hover{
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#ffffff;
text-decoration:none;
}

#com_tools{
margin-top0px;
float:left;
}

a.drop:linka.drop:visiteda.drop:active{
font-familyVerdanaArialHelveticasans-serif;
font-size10px;
color#61B7FF;
text-decoration:none;
}

a.drop:hover{
font-familyVerdanaArialHelveticasans-serif;
font-size10px;
color#61B7FF;
text-decoration:underline;
background-color#f6f6f6;
}

#menu ul .item{
display:none;
list-
style:none;
list-
style-image:none;
background-color#ffffff;
background-repeat:repeat-x;
border-bottom1px dotted #dddddd;
line-height150%;
padding1px 5px 1px 1px;
margin-left15px;
}

#menu ul:hover .item{
display:block;
list-
style:none;
list-
style-image:none;
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#61B7FF;
text-decoration:none;
}

#menu{position:absolute;
list-style:none;
list-
style-image:none;
}

.
top{
list-
style:none;
list-
style-image:none;
font-familyVerdanaArialHelveticasans-serif;
font-size12px;
color#61B7FF;
text-decoration:underline;
cursor:hand;} 


and this is the new HTML:
PHP Code:
<div id="tools">

<
div id="add_business"><a href="#">List Your Business!</a></div>

<
div id="com_tools">
<
div id="menu">
<
ul id="item1">
<
li class="top">Community Tools <img src="templates/images/arrow_down.gif" /></li>
<
li class="item"><class="drop" href="#"><img src="templates/images/arrow_right.gif" border="0" /> Submit Local News</a></li>
<
li class="item"><class="drop" href="#"><img src="templates/images/arrow_right.gif" border="0" /> Submit a Local Event</a></li>
<
li class="item"><class="drop" href="#"><img src="templates/images/arrow_right.gif" border="0" /> Send us Your Feedback</a></li>
<
li class="item"><class="drop" href="#"><img src="templates/images/arrow_right.gif" border="0" /> <strong>List Your Business</strong></a></li>
</
ul>
</
div
</
div>


</
div

Reply With Quote
  #9  
Old May 9th, 2008, 09:10 AM
essee essee is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 82 essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level)essee User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 7 h 27 m 10 sec
Reputation Power: 12
There is default padding and margins set on ul's (and the li's if I remember correctly) in all the major browsers. Margin on top and padding on left I think. Set margin and padding to 0 (or whatever you need).

There is also margin and padding set by default on many other elements have a read through this article
http://www.search-this.com/2007/03/...rgin-for-error/

I usually don't like using the universal selector (*) or a general rule that I copy into each stylesheet. Usually I make a rule and add things I use and that need it as I go. But it's personal preference really as long as your aware of it.

Something like

Code:
ul, h1, #something{
   margin:0;
   padding:0;
}

Last edited by essee : May 9th, 2008 at 09:16 AM.

Reply With Quote
  #10  
Old May 9th, 2008, 09:28 AM
toolman toolman is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jan 2004
Posts: 738 toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level)toolman User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 3 Days 23 h 8 m 51 sec
Reputation Power: 5
Thanks, I have fixed it. Many thanks!

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Link problem - not lining up in FF