weirdest problem with a definition list

This is a discussion on "weirdest problem with a definition list" within the Web Page Design section. This forum, and the thread "weirdest problem with a definition list are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 7th, 2005, 19:04
New Member
Join Date: Dec 2005
Age: 26
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
weirdest problem with a definition list

Hello.
I'm new to the forum but relatively used to CSS, so it's really bumming me out that I can't get a clue on what's wrong with this:

I tried building an events calendar using a definition list, and I need to use a corresponding image to each event. Since I'm not the one who's going to update the site after it's been delivered, and I don't know if whoever's in charge has the slightest knowledge of css, I thought it was best to link the images directly from the html markup, as a list item, so it'd be safer for the general layout when updated. Here's the html markup for it:

Code: Select all
    <div id="conteudo">

        <h4>2005</h4>    
    
        <dl class="evento">
        <dt>8 de Março</dt>
        <dd><a href="080305.html" title="8 de Março - Dia Internacional da Mulher">Dia Internacional da Mulher</a></dd>
        <dd><img src="img/080305.gif" height="50" width="75"</dd>
        <dt>25 de Novembro</dt>
        <dd><a href="251105.html" title="25 de Novembro - Dia Internacional da Não-Violência Contra as Mulheres">Dia Internacional da Não-Violência Contra as Mulheres</a></dd>
        <dd><img src="img/251105.gif" height="50" width="75"</dd>
        </dl>
                
    </div>
And how it displays with no style applied:



I'm pretty content with that, and I didn't even try styling the list's layout. But when i first checked it with the css on, that's what I got:



The images totally overlap everything, and the images only. The only style I applied was a top margin, and that was for the entire list. I lost almost an entire day of work looking for the issue; looked through parent divs, concurrent rules previously stated, the whole thing; but could not find anything wrong with both the css and the html, and only made it worse, if that's possible, when trying to fix it.

So, if anyone could help me, I'd really appreciate it.

Here's the page http://magasin.letzebuerg.org/crmm/eventos.html
Here's the css http://magasin.letzebuerg.org/crmm/css/css.css

Thanks.

[edit: typos]

Last edited by resplence; Dec 7th, 2005 at 19:15.
Reply With Quote

  #2 (permalink)  
Old Dec 7th, 2005, 22:22
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: weirdest problem with a definition list

Oooooo I want to figure this out, but I'm off to dinner with my girl. I'll be back later to take a stab at it...
Reply With Quote
  #3 (permalink)  
Old Dec 8th, 2005, 00:31
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to herkalees Send a message via MSN to herkalees Send a message via Yahoo to herkalees
Re: weirdest problem with a definition list

First, you have two code errors:
1. The two images in question aren't closed at all:
Code: Select all
<dl class="evento">
<dt>8 de Março</dt>
<dd><a href="080305.html" title="8 de Março - Dia Internacional da Mulher">Dia Internacional da Mulher</a></dd>
<dd><img src="img/080305.gif" height="50" width="75" /></dd>
<dt>25 de Novembro</dt>
<dd><a href="251105.html" title="25 de Novembro - Dia Internacional da Não-Violência Contra as Mulheres">Dia Internacional da Não-Violência Contra as Mulheres</a></dd>
<dd><img src="img/251105.gif" height="50" width="75" /></dd>
</dl>
2. One of the CSS selectors isn't closed either:
Code: Select all
dl.evento {
margin: 1em 0;
padding: 0;
}
/* cursos
*/
And suprisingly, after all that, the images still don't look how you want them. But, if you remove this selector, it works perfectly:
#conteudo img {
margin-top: -150px;
margin-right: 5px;
float: right;
}
So, remove that, hooray!
Reply With Quote
  #4 (permalink)  
Old Dec 8th, 2005, 22:05
New Member
Join Date: Dec 2005
Age: 26
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: weirdest problem with a definition list

Wow, thank you! It's true that if you spend too much time lookin through a code it'll start looking all the same. I looked all over for some selector applied to an img tag and totally missed that.

I had set that selector temporarily to check some positioning in the index and forgot erasing it later. Amazing the time I lost because of something insignificant like that. Lazy coding anyway!

Thank you one more time
Reply With Quote
Reply

Tags
weirdest, problem, definition, list

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
First image problem and inline list problem konnor5092 Web Page Design 8 Dec 1st, 2007 09:08
Google analytics - definition? Cratima Search Engine Optimization (SEO) 2 Nov 22nd, 2007 13:29
unordered list problem in FF alexgeek Web Page Design 4 Sep 10th, 2007 15:26
Link list problem in IE clickedon Web Page Design 5 Aug 18th, 2006 15:31
CSS Unordered List Problem relph2 Web Page Design 3 Jan 7th, 2006 18:14


All times are GMT. The time now is 07:52.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43