Div Tag in Firefox...

Discussion in 'Web Design and Development' started by ClassicFan, Nov 27, 2008.

  1. ClassicFan macrumors member

    ClassicFan

    Joined:
    Nov 14, 2007
    #1
    So i've been designing my website in Dreamweaver and all and I tried to add text into a div tag. My website is made mainly of images and such.. So when I added the div tag, Firefox would scramble all of the images up. But how can I prevent this from happening? And what is the benefit of having actual text rather than image text on a web page?

    Thanks,
    Nick
     
  2. 66217 Guest

    Joined:
    Jan 30, 2006
    #2
    Can you shoe us the page and the code? I don't think I'm understanding what you are saying.
     
  3. werther macrumors regular

    Joined:
    May 15, 2006
    #3
    yeah, without seeing the page/code it's hard to say why.

    As for 'what is the benefit of text over text in images':

    To start it makes it much easier to update if it's only text. You don't have to go to your graphics program and rework the image every time there is a change. Also SEO (search engine optimization). Search engines cannot index text embedded in images.
     
  4. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #4
    I get what the OP is saying -- the alignment of content elements gets out of whack (the flow of the page) when a block level div is added into the mix. It's like mixing layout techniques - it aint gonna be pretty.

    Of course we'll need to see the actual code to resolve the issue. Might want to convert the div to a span for the time being, that's an inline element. Or add "style='float: left'" inside that opening div tag manually (or assign an ID to the div and put that in your style sheet, the more elegant solution).

    My general advice to the OP for future projects is to either start with templates (where the layout is fixed) to ensure proper layout across most browsers, or use tables in WYSIWYG mode in DW (it's default mode) or create the basic page layout BY HAND using div's and CSS once you learn the basics (preferred) and start putting content in those div's. And wrap the whole page in a master div (a single div to control total page size, background color, and ensure proper positioning and alignment of the interior elements when you start getting into absolute vs relative positioning).

    How to build a basic CSS layout (learn about float and alignment)
    CSS positioning basics (W3C Schools, excellent tutorial, a must read)

    -jim
     
  5. memco macrumors 6502

    Joined:
    May 1, 2008
    #5
    As to using text instead of images–the benefit is that your site will be much easier to find by people using search engines. Further, not everyone visiting your website can see, so if you use actual text, those people can still have the text read to them by programs or devices designed to do so. Another plus, is that it's a lot easier to maintain your website.
     
  6. SrWebDeveloper macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #6
    Fantastic advice. Well said. :D

    -jim
     
  7. georgemacin macrumors newbie

    Joined:
    Apr 20, 2014

Share This Page