SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast bernadette's Avatar
    Join Date
    Aug 2007
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    display:block is not working for IE? what's the right hack??

    i need to make a hyperlink for and image in header and here's the code:

    html:
    <div id="wholeheader"> <a name="top"> </a>
    <div class="header">
    <div class="logo">
    <a href="#whatever"></a>
    <div class="headertext"> </div>
    </div>
    </div>

    css:#wholeheader {margin:0 auto;
    width:833px;
    height:264px;
    padding:0;
    border-left:1px solid #e2dbd0;
    border-right:1px solid #e2dbd0;
    float:left;
    }




    div.header {width:830px;
    height:117px;
    margin:0;
    padding:0;
    float:left;
    clear:both;
    }



    div.logo {width:216px;
    height:117px;
    background-image:url(../images/logo.jpg);
    background-repeat:no-repeat;
    padding:0;
    margin:0;
    float:left;
    display:block;
    }

    div.logo a {display:block;
    float:left;
    width:216px;
    height:117px;
    }


    I tried this hack for IE, but still not working:
    * html div.logo a {width:100&#37;;}

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Do you have a link to the page or can upload an image somewhere?

    Why is there no text and no semantic meaning to anything in your markup?
    Your page would mean absolutely nothing to a search engine..

    I'm positive there's a better way to code your header but I don't know what style you are trying to achieve.

  3. #3
    SitePoint Enthusiast bernadette's Avatar
    Join Date
    Aug 2007
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah there is a link will be placed instead of "#whatever"


    what do u suggest for improving the seo thing?

  4. #4
    SitePoint Addict
    Join Date
    Jun 2007
    Posts
    396
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Well, put the company name between the a link for a start, and what does the div (with headerclass) do exactly?

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    yeah there is a link will be placed instead of "#whatever"
    I meant can we view your page online? can you provide a link to the page.

  6. #6
    SitePoint Enthusiast bernadette's Avatar
    Join Date
    Aug 2007
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    aww sorry
    ok it's "http://www.solar.sabrycorp.com"

  7. #7
    SitePoint Enthusiast bernadette's Avatar
    Join Date
    Aug 2007
    Posts
    46
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xkratosx View Post
    Well, put the company name between the a link for a start, and what does the div (with headerclass) do exactly?

    the .header div is to group other divs

    i cant put the company's name here bacause it's a pic, but i can put the link for the page on the picture and this is what i've done but facing problem with ie

  8. #8
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Firstly, you should start considering making your code valid with a strict doctype.
    --
    I might consider just changing the whole header to an image

    Code:
    <img src="heading.jpg">
    That's much simpler. If it were up to me, I would make the text within the right side of the banner standard HTML text and not an image.

    If you wanted to make the text within the images available to SE's and browsers without images attached use an image replacement technique to place the images over the top of the content.

    The method I use: http://www.pmob.co.uk/temp/navimagereplace.htm

  9. #9
    SitePoint Addict
    Join Date
    Jun 2007
    Posts
    396
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by bernadette View Post
    i cant put the company's name here bacause it's a pic, but i can put the link for the page on the picture and this is what i've done but facing problem with ie
    What you should do (I think) is put the company name in as text anyway, and then in the CSS put the attribute:

    text-indent: -999em

    This is useful as not only do some browsers not display listed items with nothing in them (this could be related to your problem...) but it'll also make sure that the correct text will show up on anything like screen readers, people with CSS or images disabled and mostly importantly; search engines.


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
  •