1 reply [Last post]
vishalmelmatti
Offline
newbie
Last seen: 10 years 4 weeks ago
Timezone: GMT+5.5
Joined: 2011-12-28
Posts: 1
Points: 2

Hi All,

I am new to css.

I will be thankful if anybody can help me out to sort out the problem. Below is the code.

<ul style="border:solid 1px #F00;">
  <li style="display:inline; border:solid 1px #F00;"><a href="index.html">Title1</a></li>
  <li style="display:inline; border:solid 1px #F00; float:right"><a href="tasks.html">Title2</a></li>
</ul>

I am getting 21 px of offset in IE7. How to fix it and display both titles in same line but title2 should be right float.

Below is the screen shot.

css-right-top-problem.png

//mod edit: bbcode added. Please read the sticky messages on how to post to the forums. ~gt

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 47 weeks 7 hours ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9776
Points: 3858

Float the first element

Float the first element instead of the second. See ยง9.5 Floats.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.