3 replies [Last post]
dappy
dappy's picture
Offline
Regular
United States
Last seen: 15 years 34 weeks ago
United States
Timezone: GMT-4
Joined: 2005-02-18
Posts: 50
Points: 0

Hello,

I am trying to make the first line of a paragraph bold. It works in FF but not in IE. According to the test on this site, first-line is supported by IE6 but when I click on the link to show the test page, it doesn't work in my IE6. So is it not supported or am I doing something wrong?

My CSS:

.browseBOX {
	float: left;
	position: relative;
	display: block;
	background-color: white;
	border:  1px solid black;
	margin: 12px 0 0 12px;
	padding:  10px;
	width:  272px;
	height:  80px;
	text-align: right;	
	text-decoration: none;
}

.browseTXT{
	float:  right;
	display: block;
	width:  136px;
	text-align:left;
	color: black;
	margin: 0;
	padding: 0;
	color:  black;
	font: normal 11px/14px Arial, Verdana, Helvetica, sans-serif;
}

.browseBOX p:first-line{
	font-weight:bold;
}

HTML:
<a href="" class="browseBOX"><p class="browseTXT">adidas<br/>adiStar Wrestling Shoe<br/><span class="orangeTXT">Price: $135.99</span></p></a>

is it because the <p> is inside a link which is an inline element? But then why wouldn't the test page work in IE6 either...
http://www.csscreator.com/attributes/tests/first-line.html

Anonymous
Anonymous's picture
Guru

:first-line pseudo not working in IE

I don't think IE supports pseudo elements on anything but anchors. And then only the link/visited/hover/active.

Someone that knows more will be here shortly to confirm or deny that. Smile

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

:first-line pseudo not working in IE

IE supports :first-line well enough. Before going further, though, get your html valid. <a><p>...</p></a> is not allowed. It may be a factor.

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.

dappy
dappy's picture
Offline
Regular
United States
Last seen: 15 years 34 weeks ago
United States
Timezone: GMT-4
Joined: 2005-02-18
Posts: 50
Points: 0

valid html

I fixed my html. Forgot to check it before I posted. But it has been fixed. And still does not work. What concerns me is that on the css forum property test page in my initial post, the :first-line did not work. even though it was stated as fully supported.