Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why is unneeded space added?

Status
Not open for further replies.

NMDUC

Programmer
Mar 4, 2006
61
VN
Hi,
I am making a layout for my web site. There is a line which contains a ASP.NET breadcrumb and a slogan. Here are my code:

<div class="header_thirdline">
<asp:SiteMapPath runat="server" ID="SiteMapPath1" CurrentNodeStyle-CssClass="BreadcrumbText" PathSeparatorStyle-CssClass="BreadcrumbText" NodeStyle-CssClass="BreadcrumbText" RootNodeStyle-CssClass="BreadcrumbText"></asp:SiteMapPath>
<span class="slogan">
<img id="img1" alt="Slogan" src="~/images/common/onestop_img.jpg" runat="server" />
</span>
</div>

Next is the CSS code:

.slogan
{
float:right;
}

/*Breadcrumb area*/
.BreadcrumbText
{
color:Gray;
float:left;
border-width:3px;
border-color:Blue;
border-style:double;
}

a.BreadcrumbText:link, a.BreadcrumbText:visited
{
color:Gray;
float:left;
}

.header_thirdline
{
width:100%;
display:block;
float:left;
}

When I viewed in IE, there are more line (or space) added in the header_thirdline. The height of breadcrumb and slogan is x px while header_thirdline's height is x+p. P might be equal to 2*x. I tried to solve it. The breadcrumb was removed and everything was fine. So, what is the error with the breadcrumb?
It happened only in IE. FF is fine.

Please help me to solve it. Thank in advance.
Duc
 
Huh? Can you show us the code? And not the server-side ASP.NET stuff, the actual rendered code that appears in the browser (do a view source and copy that).

I am not entirely sure what you're doing but whatever it is, it might be that you're overthinking it. Before I see the actual code, it is all just guessing and since it could be so many things, I don't even dare try.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Please help me to solve it
Help yourself by posting the actual HTML that the browser gets, rather than your asp code (ie. do a view source on the browser and cut+paste that). We can't replicate your fault without knowing what that SiteMapPath thing gets rendered as.

Also, is it failing in all versions of IE or just IE6?

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Thank for your reply. I solved it. I am not sure what problem is. Here is the solution.

<div class="header_thirdline">
<span class="BreadcrumbText">
<asp:SiteMapPath runat="server" ID="smpBreadcrumb1"></asp:SiteMapPath>
</span>
<span class="slogan">
<img id="img1" alt="Slogan" src="~/images/common/onestop_img.jpg" runat="server" />
</span>
</div>

.slogan
{
float:right;
}

/*Breadcrumb area*/
.BreadcrumbText
{
color:Gray;
float:left;
}

.BreadcrumbText a:link, .BreadcrumbText a:visited
{
color:Gray;
vertical-align:top;
}
 
Good for you. [thumbsup2]

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top