Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Make Dl Drop Its Margin, through css o'course!
Lozbo
post Nov 15 2005, 02:02 AM
Post #1


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



Theres my page. Theres my headings, my paragraphs and my lists. But then, i want everybody to drop their default margin and padding, so that i can assign them other. Actually there wont be any margin, so the backgrounds of sucesive adjacent elements wont look odd.

The only one giving trouble is the Definition list, i dont know how to tell it not to have that margin, or padding or whatevers messing around.

Here, have my code:

HTML
<h3>Escolaridad</h3>
<dl>
<dt>Carrera</dt>
<dd>Licenciatura en Sistemas de Informaci&oacute;n por la Universidad de Guadalajara; CUCEA Agosto 2001 - Junio 2005 <br />
Titulaci&oacute;n por Excelencia<br />
Mejor promedio de la Generaci&oacute;n saliente en el ciclo 2005 A<br />
Constancia en la XXX Ceremonia de Reconocimiento y Est&iacute;mulo a Estudiantes Sobresalientes - CREES 2005 </dd>


And its respective css:

CODE

div#container h1,
div#container h2,
div#container h3,
div#container h4,
div#container h5,  
div#container p,  
div#container ul,  
div#container ol,  
div#container dl,  
div#container li,
div#container dt,  
div#container dd, {margin:0 !important;}


What should i do? its still showing this darn white space between the h3 and the dl...

Thanks in advance!

- 10730
Go to the top of the page
 
+Quote Post
Tyssen
post Nov 15 2005, 02:31 AM
Post #2



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



Have you got padding applied to any of the elements involved? And rather than setting margin:0 the way you have, you'd be better off doing this:

CODE
* { margin: 0; }

That sets it to 0 for every element. Then you put it back on for the ones you want it to have.
Go to the top of the page
 
+Quote Post
arboc7
post Nov 15 2005, 02:41 AM
Post #3


Advanced Member
*******

Group: Members
Posts: 123
Joined: 5-September 05
Member No.: 11,522



I agree with Tyssen (again...as on many occasions). Also, why are you using "!important" when you could use much better, fully standards-compliant CSS or use simpler CSS browser filters?? That just doesn't make sense to me. Oh well...

Good luck!
Go to the top of the page
 
+Quote Post
Lozbo
post Nov 16 2005, 02:29 AM
Post #4


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



Wait, what do you mean full standards-compliant css? isnt "!important" standard? I'll try the * thing, thanks...

And what are those css browser filters?
Go to the top of the page
 
+Quote Post
Tyssen
post Nov 16 2005, 11:57 PM
Post #5



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(Lozbo @ Nov 16 2005, 12:29 PM)
And what are those css browser filters?

I'm not positive, but I think he may have been talking about CSS hacks to feed certain rules to some browsers and not others, e.g.:

CODE
* html #yourDiv {
width: 200px;
w\idth: 220px;
}

That gives one value to IE5+ but then sets it back again for IEMac/IE6. The rule is ignored by all other browsers.
There are other selectors you can use to feed rules to non-IE browsers only too.
Go to the top of the page
 
+Quote Post
Lozbo
post Dec 1 2005, 11:32 PM
Post #6


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



I do know about the hacks, but what i ask about the css filters is how they work or what exactly are them, js + css amalgam or what? Couse i've seen some around, im not sure if they are actually hacks or built in kinda custom scripts which make crazy things, like blury text and other stuff, im not sure which or how but i once got to see one, but i didnt understand css back then, all i know is that dreamweaver actually supports them but i dont know how to use them (they can be found in the last section of the css style panel when you visually edit a rule, i mean, not in the code part).

And about the !important thing... some arboc said that why dont i use a fully standards compliant rule (refering to !important) so i ask is it not !important a standard?

Thanks!
Go to the top of the page
 
+Quote Post
Tyssen
post Dec 2 2005, 11:01 PM
Post #7



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(Lozbo @ Dec 2 2005, 09:32 AM)
And about the !important thing... some arboc said that why dont i use a fully standards compliant rule (refering to !important) so i ask is it not !important a standard?

It it fully supported but most of the time when you see it in newbies' stylesheets is cos they don't properly understand the rules of CSS inheritance or specificity. They can't figure out why a certain rule is not working so they give it !important when really they should be searching for the cause of it not working as required.
Go to the top of the page
 
+Quote Post
Lozbo
post Dec 3 2005, 12:22 AM
Post #8


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



I dont quite understand that yet hehe bythe way... tongue.gif

I know that the more specific the rule is the higher the importance of inheritance is and i saw a rule to get how much weight exactly a rule has, for the name of the element, the class and the id (the more specific, the more weight) but dont understand it totally...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. File Sharing Hosts!(3)
  2. Is It Really Possible To Make Any Money Online?(14)
  3. Make Free Money Online(2)
  4. Make An Extra $50 Or More Per Day!(5)
  5. Paypal(10)
  6. How Do I Make A Website(20)
  7. Runescape Private Server(69)
  8. How To Make A Website ?(11)
  9. A Pretty Good Easy Way To Make Some Money(21)
  10. Best Ways To Make Money In Runescape(12)
  11. Key Logger.(36)
  12. How To Make Your Own Counter Strike Source Dedicated Server!(34)
  13. Budding Java Game Developers?(9)
  14. How To Make A Counter Strike 1.6 Dedicated Server(16)
  15. How Do I Make Gold Fast In Runescape/(126)
  1. Make Money Online!(17)
  2. How To Get A Girl That Has Refused You(12)
  3. What Kind Of Car Do You Have?(26)
  4. Making Money Creating Logo's(19)
  5. Seeking Help With Javascript(1)
  6. Help Creating A Profile Website(13)
  7. Make Your Own Mmorpg(41)
  8. How To Make Image Buttons Act As Submit Button(8)
  9. Make Calls From The Internet?(8)