Topic: superfluous <div> ??

I hate to post this much code at once....
I have been, amongst other things, trying to get rid of all the errors on my pages according to W3 Validator
It gives me the "0 errors! You rock. Have a logo saying so." page. Thing is, it requires me to place a </div> that messes up my styling. The brighter red should contain the entire page's contents, which it will do if i remove any of the </div>s near the bottom (remove from anywhere else and it fixes the red container but moves something where it doesn't belong).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">

<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang=
"en">
  <head>
    <meta http-equiv="content-type" content=
    "text/html; charset=us-ascii" />
    <link type="text/css" rel="stylesheet" href="/floatbox/floatbox.css" />
<script type="text/javascript" src="/floatbox/floatbox.js"></script>
    <title>
      Dawn Somers - Photographer - Photos
    </title>
    <link rel="stylesheet" href="photo_page_files/nu_002.css"
    type="text/css" media="screen" charset="utf-8" />
    <link rel="stylesheet" href="photo_page_files/nu.css" type=
    "text/css" media="screen" charset="utf-8" />
  </head>
  <body id="nu-red">
    <div id="container">
      <div id="title">
        <h1>
          Dawn Somers - Photographer
        </h1>
        <h2>
          Wedding, Family &amp; Senior Portraits
        </h2>
      </div>
      <div id="rightCol"></div>
      <div id="navigation">
        <ul>
          <li>
            <a href="index.html">Home</a>
          </li>
          <li>
            <a href="Photos_people.htm">People</a>
          </li>
          <li class="active">
            <b><a href="Photos_weddings.htm">Weddings</a></b>
          </li>
          <li>
            <a href="Photos_places.htm">Scenery</a>
          </li>
          <li>
            <a href="Contact.htm">Contact</a>
          </li>
        </ul>
      </div>
      <div id="content_wrapper">
        <div id="content">
          <h2>
            Wedding Photos <font size="1">Click to Zoom</font>
          </h2>
          <div>
            <div style="margin: 2px; display: inline;">
              <a href="Photos/wed/pavilion.jpg" class=
              "lightwindow" rel="floatboxgroup">
                            <img src="Photos/wed/pavilion.jpg" alt="pavilion.jpg"
              width="75" height="100" />
                            </a>
*           </div>
*          </div>
*        </div>
*      </div>
*     </div>
      <div class="clearer"></div>
      <div id="footercontain" align="justify">
       <div id="footleft">Site Designed and Authored by Tim Radford</div>
                <div id="footmid">All photos &copy; Dawn Somers</div>
                <div id="footright">Best viewed with<a href="http://www.firefox.com/"><img align="top" border="0" alt="Spreadfirefox Affiliate Button" src=
        "[url]http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/FF3b80x15_square.gif[/url]" /></a></div>
      </div>
  </body>
</html>

Vote up Vote down

Re: superfluous <div> ??

We need your css files and preferably the images as well; all I get is plain text without them, no red anywhere.

Is there an online link?

Vote up Vote down

Re: superfluous <div> ??

crap, sorry. i wasn't really awake when i put it up.

sometimes the site is at http://andale.homeip.net:9595 (i been having issues with the dynamic ip rerouting)
NOTE: the page I am fixing is ../Photos_weddings.htm


nu.css

body {
background: #300;
color: #fff;
}

a, a:visited, a:active {
color: #622;
background: inherit;
}
#big {
}

#container {
color: #000;
/*border: solid 2px #000;*/
background: #400;
}

#title {
color: #100;
background: #fff url('../backgrounds/nu-red_headerbg.gif') top left no-repeat;
}

#navigation {
background: url('../backgrounds/nu-red_navug.gif') bottom center no-repeat;
}

#navigation li a {
background: #633;
color: #fff;
border-style: solid;
border-width: 1px 0 1px 0;
border-color: #966 #300 #300 #966;
}

#navigation li a:hover {
background: #a77;
color: #fff;
}

#content {
background: #fff;
}

#rightCol {
background: inherit;
}


#footercontain {
     color: #990000;
     font-size: 9px;
     font-family: Verdana, Geneva, Arial, sans-serif;
     background-color: #300;
         position: fixed;
     bottom: 0px;
     left: 0px;
     width: 100%;
     height: 15px
     }

#footleft {
         float: left;
     text-align: left;
         width: 33%;
         }
#footmid {
         float: left;
         text-align: center;
         width: 34%;
         }
#footright {
         float: right;
     text-align: right;
         width: 33%;
         }

nu_002.css

* { margin: 0; padding: 0; } /* cross browser sync */

body {
font-family: Verdana, sans-serif;
font-size: 0.8em;
}

a, a:visited, a:active {
font-weight: bold;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }

.clearer { clear:both; line-height: 0; visibility: hidden; height: 0; }

#container {
width: 900px;
padding: 10px;
margin: 30px auto;
}


#title {
width: 680px;
height: 100px;
float: left;
text-align: center;
}

#navigation {
width: 160px;
float: left;
padding-bottom: 100px;
}

#navigation li {
list-style:none;
width: 160px;
}

#navigation li a {
display: block;
width: 160px;
padding: 5px;
}

#navigation li a:hover {
text-decoration: none;
}

#content_wrapper {
padding: 5px;
background: #fff;
float: left;
margin-left: 10px;
}

#content {
width: 500px;
overflow: auto;
}
/*#content ul {
margin: 5px 10px;
}
#content li {
margin-left: 30px;
}*/
#content h3 {
margin-top: 10px;
}

#content p {
padding-left: 10px;
}

#rightCol {
width: 220px;
text-align: center;
float: right;
}

/*-------Begin New by AF--------*/
#content ul {
    list-style-type:disc;
    margin-bottom:10px;
    }
#content ol {
    list-style-type:decimal;
    margin-bottom:10px;
    }

#content ul li {
    list-style-type:disc;
    margin: 5px 25px;
    }
#content ol li {
    list-style-type:decimal;
    margin: 5px 25px;
    }
/*-------End New by AF--------*/

the photo may have nothing to link to, but it won't affect the red's existence

Last edited by AndaleTheGreat (March 1, 2009 11:22 am)

Vote up Vote down

Re: superfluous <div> ??

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="SHORTCUT ICON" href="../favicon.ico">
<title>Dawn Somers - Photographer - Dawn Somers</title>
<link rel="stylesheet" href="index_files/nu_002.css" type=
"text/css" media="screen" charset="utf-8">
<link rel="stylesheet" href="index_files/nu.css" type="text/css"
media="screen" charset="utf-8">
</head>
<body id="nu-red">
<div id="container">
<div id="title">
<h1>Dawn Somers - Photographer</h1>
<h2>Wedding, Family &amp; Senior Portraits</h2>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width=
"680" height="160"><param name="movie" value="b_slideshow.swf">
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="b_slideshow.swf"
width="680" height="160"><!--<![endif]-->
<p>Alternative content</p>
<!--[if !IE]>--></object> <!--<![endif]--></object></div>
<div id="rightCol"></div>
<div id="navigation">
<ul>
<li class="active"><a href="index.html"><b>Home</b></a></li>
<li><a href="Photos_people.htm">People</a></li>
<li><a href="Photos_weddings.htm">Weddings</a></li>
<li><a href="Photos_places.htm">Places</a></li>

<li><a href="Contact.htm">Contact</a></li>
</ul>
</div>
<div id="content_wrapper">
<div id="content">
<h2>Dawn Somers</h2>
&nbsp;&nbsp;&nbsp; A professional photographer since xxxx, Dawn has
photographed families, children, private parties and weddings. She
is available for private work....blah blah blah</div>
</div>
<div class="clearer"></div>
<div id="footercontain" align="justify">
<div id="footleft">Site Designed and Authored by Tim Radford</div>
<div id="footmid">All photos © Dawn Somers</div>

<div id="footright">Best viewed with<a href=
"http://www.firefox.com/"><img align="top" border="0" alt=
"Spreadfirefox Affiliate Button" src=
"http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/FF3b80x15_square.gif"></a></div>
</div>
</div>
</body>
</html>

Try that.

My signature goes here --> X

Vote up Vote down

Re: superfluous <div> ??

You didn't ask for a review, but I thought I'd point out what I notice when I look at the site - it's just my opinion, consider it or not -

The images in the flash banner are of very bad quality - I understand that was done to keep the file size down, but this is a photographer's site - the images there should look good.

The red on maroon in the footer is almost impossible to read - I imagine for colorblind or vision impaired folks it's totally impossible.  And it's not professional to add a 'best viewed with Browser' to a website - professionals build sites that work everywhere (within reason - it's ok to ignore IE < 6)

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: superfluous <div> ??

It would seem that you are designing this site as you build it. Probably the most difficult way to design the site...graphically.

You should have a complete mockup design of the site you would like to build. Once you are completely satisfied with the graphical design, you can then implement the design into html/css.

And Thelma is right. Redo do the flash. What you have now will only hurt your business.

Imagine Building and Managing an Online Business
The Kasper Group

Vote up Vote down

Re: superfluous <div> ??

well, your all right. This is my first web page since they made me make one in high school back in '97. smile
The flash was a mockup as I did not have the original files yet. As far as size I think people will realize "it's a photographer's gallery and therefore high quality" so I planned on large files in the end.
Thelma - I actually do appreciate your points and would eventually have probably asked a general opinion (if there's a directory here for those requests).
newseed -  As far as design I used a template. I created this in one of my free comcast sites then made it my own. Everything was going well until I really started hacking it apart when I created the footer, then I fixed it, then I noticed an error HTML-kit said I was missing a </div> so I added it, it broke the layout, took it out, it fixed the layout.

Personally, I hate IE and a monetary supporter of FF, plus I could care less if the site is nothing but a bruise if you use IE to look at it, but I do know better than to disclude it in the end. I would fix it for IE7 as well right now if I had any idea as to what's wrong, but I remove IE from my windows install as it is and the IETab for FF is only IE6 I'm pretty sure.
My goal for now has been to get the site going in any form. Obviously I don't plan on running from andale.homeip.net:9595 forever.

jlhaslip - don't know what u changed, would like to know since it is from my index page instead of the code above. Sorry I didn't note which page.
NOTE: The only pages I am working on are ../index.html ../Photos_weddings.htm & ../Contact.htm
The page relative to me questions in this topic is ../Photos_weddings.htm

Oh yeah, I made the red on red footer on purpose. I think the footer should be noticeable but not glaring. It contains the info necessary. I felt there was no need to push it into focus. I also realize that, in IE6, it just sits at bottom of the page.

Last edited by AndaleTheGreat (March 1, 2009 11:35 am)

Vote up Vote down

Re: superfluous <div> ??

OH NEAT! jlhaslip fixed my IE issues! How awesome of of you.

Vote up Vote down

Re: superfluous <div> ??

AndaleTheGreat wrote:

Oh yeah, I made the red on red footer on purpose. I think the footer should be noticeable but not glaring. It contains the info necessary. I felt there was no need to push it into focus.

There is a difference between glaring and legible.  If the info is important enough to appear, it's important enough to be legible.

Just because my computer is online does not mean that I am.
a&b WebDesign

Vote up Vote down

Re: superfluous <div> ??

jlhaslip, what did you change here? I am having trouble frinding exactly what's changed to make it work in IE

Vote up Vote down

Re: superfluous <div> ??

Not sure, really. There seemed to be a flaw in there that got fixed, but I don't recall the specifics and didn't keep any notes.  I did run the code through the Html Tidy in the Firefox Browser and that might have fixed something, too.

My signature goes here --> X

Vote up Vote down

Re: superfluous <div> ??

okay... ?:/?
well, whatever it was i couldn't tell you. I'm not very good at side by side comparison when text is on-screen. I used your tidied version of my index page and rebuilt the photo pages from that, adding one element at a time, until it was there. I also scrapped my css files for the photo pages and used the ones from index.
I could probably combine these but felt it would be easier to keep all my photo pages linked to one css file and the other pages to their own in case i needed to customize a page. I also felt this would guarantee uniformity across pages.

EDIT:

So awesome!! Thanks to the help here and several posts/threads already on the site I have got the look I wanted (except that STUPID gap won't go away)  and have my 3 test pages all validating correctly for html and 2 of them for css. I don't think I can worry about the photo gallery css being validated since I think it's entirely due to confusion caused by floatbox.

Last edited by AndaleTheGreat (March 3, 2009 8:14 pm)

Vote up Vote down