homepage Welcome to WebmasterWorld Guest from 54.167.10.244
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
<h1> in CSS
jckos




msg:1206794
 8:17 pm on Feb 7, 2003 (gmt 0)

For search engine purposes, I'm trying to use an <h1> tag at the top of a page, but it gives me an unwanted line break that misalligns the text with a related image.

I want the image and text to line up like a nav image button and asasociated text.

Is there anyway to eliminate the break in the <h1> tags through CSS?

Thanks

 

Macguru




msg:1206795
 8:23 pm on Feb 7, 2003 (gmt 0)

Hi jckos,
I found this interesting thread in the forum's library [webmasterworld.com].

[webmasterworld.com...]

jckos




msg:1206796
 8:42 pm on Feb 7, 2003 (gmt 0)

I tried that and still no luck, at least in IE 6.

Any other help out there?

Nick_W




msg:1206797
 8:45 pm on Feb 7, 2003 (gmt 0)

Can you post a simplified and very short code snippet?

Nick

jckos




msg:1206798
 8:59 pm on Feb 7, 2003 (gmt 0)

<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#999999">
<tr nowrap cellspacing="0">
<td bgcolor="#999999" align="left"><img src="image.gif" height="22" width="17" border="0"></td>
<td><a href="mylink.html" title="title"><img src="image2.gif" height="16" width="16" border="0" alt="alt text"></a>&nbsp;<a href="mylink.html" title="Alt text"><h1>Click Here</h1></a></td>
</tr>
</table>

From the css file:

h1 {
font-size: 12 px;
border: 1px solid red;
margin: 0;
padding: 0;
}

I tried margin-bottom: 0 and padding-bottom: 0

choster




msg:1206799
 9:01 pm on Feb 7, 2003 (gmt 0)

Have you tried setting
display:inline?
jckos




msg:1206800
 9:05 pm on Feb 7, 2003 (gmt 0)

I hadn't but I tried and it fixed it!

Never seen that tag before. Is it cross browser compaitble?

Thanks for the heads up.

DrDoc




msg:1206801
 9:13 pm on Feb 7, 2003 (gmt 0)

My 2 ..

Put the link inbetween the <h1> tags .. not vice versa the way you have it now. Headings are block-level elements, anchors are inline-level elements. Block-level elements are not supposed to be located within an inline-level element .. (validation stuff) :)

jckos




msg:1206802
 9:21 pm on Feb 7, 2003 (gmt 0)

Thanks

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved