Welcome to TalkGraphics.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Adventures with h1 tags..

    I thought that since XWD doesn't support generation of h1 tags and text styles, I'd have a go at doing my own version. After some experiments I have a close result but it's not right. I wonder if anyone can find the missing link here?

    The goal was to take the html output from XWD and add h1 tags to it (lets say because I wanted to do that - SEO relevant or not), but still retain the WYSIWYG of XWD.

    The problem with just adding a <h1> tag is that it immediately restyles the text that it encloses blowing away the layout. What I have been looking for is a universal style definition that could be added to the default h1 style so that it would take on the appearance of the parent div rather than the default h1 styling. I can get the appearance right, but the vertical position is wrong. Any suggestions?

    I've attached an image - the top text should have been between the red lines - it is styled with h1 tags.

    The lower one is without h1 applied.

    I've also attached my h1 tamperings and the original web file.

    Here is my h1 style mod:

    <h1 style="font:inherit; position:inherit; top:inherit; padding:inherit; border:inherit;">

    I'm not sure if what I'm doing is possible, but if it is, we would be able to add h1 tags for SEO after XWD page generation. It's just an experiment.

    Paul
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	h1_screenshot.png 
Views:	251 
Size:	9.4 KB 
ID:	62336  
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2004
    Location
    Ukraine
    Posts
    3,904

    Default Re: Adventures with h1 tags..

    Here's the working variant.
    But! It doesn't work in IE7 (neither original nor mine). So far I have also tested it in Opera and FF and both are ok.
    Attached Files Attached Files
    John.

  3. #3
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Adventures with h1 tags..

    Quote Originally Posted by covoxer View Post
    Here's the working variant.
    But! It doesn't work in IE7 (neither original nor mine). So far I have also tested it in Opera and FF and both are ok.
    Thanks for looking in John. Yes, you're right. It seems that ie doesn't really do font:inherit. Incorporating the font style from the enclosing div, it does work as expected. Hmm.

    It looks as though this would be a workable solution for a few h1 headlines without breaking the layout - sort of a manual version of "mark this text as h1".

    Thanks John.

  4. #4
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,044

    Default Re: Adventures with h1 tags..

    Would line-height help?

    Drwyd

  5. #5
    Join Date
    Sep 2000
    Location
    Bracknell, UK
    Posts
    8,659

    Default Re: Adventures with h1 tags..

    Didn't seem to. The ie problems seems to be related to the font inheritance - it's fine if I set the font details.

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •