[css] clippen div werkt niet

Pagina: 1
Acties:

  • tombo_inc
  • Registratie: December 2004
  • Laatst online: 16-12-2025
hallo,
ik ben wat met css aan het klooien en nu was ik bezig met de clip property.
als ik echter een div wil clippen dan doet ie dat niet. de hele div verdwijnt gewoon van mijn scherm.
ik heb voor mijn gevoel alles geprobeerd, maar niks wil werken. weet iemand hoe dit kan?
mijn code:
Cascading Stylesheet:
1
2
3
4
5
6
7
8
9
10
#divid {
  border: 1px solid green;
  float: left;
  padding: 0px 3px 0px 3px;
  position: absolute;
  left: 20px;
  right: 20px;
  overflow: hidden;
  clip: rect(100px, 5px, 100px, 5px)
}

de div bevat verder een aantal links en plaatjes.

Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition


  • frickY
  • Registratie: Juli 2001
  • Laatst online: 17:28
Als ik mij niet vergis gebruik je clip voor afbeeldingen.
Voor een div zou ik de breedte en hoogte gewoon instellen, en de overflow op hidden.

Zie ook http://www.w3schools.com/css/pr_pos_clip.asp

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Het zou in principe moeten werken, hoe groot is je div eigenlijk?

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


  • Fatamorgana
  • Registratie: Augustus 2001
  • Laatst online: 21-07-2025

Fatamorgana

Fietsen is gezond.

Is dit niet een beetje raar? clip: rect(100px, 5px, 100px, 5px)

x,y 2x hetzelfde.

  • tombo_inc
  • Registratie: December 2004
  • Laatst online: 16-12-2025
mijn div is 100px hoog en 400 breed. verder zijn de parameters van de rect(top, right, bottom, left).
het lijkt mij ook dat het moet werken, maar mijn div verdwijnt gewoon.

Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition


  • crisp
  • Registratie: Februari 2000
  • Laatst online: 20:29

crisp

Devver

Pixelated

In alle browsers?
IE heeft namelijk nogal moeite met clipping. Het vreemde is dat IE het in sommige gevallen pas pakt als je de clipping property dmv script toekent.

zie bijvoorbeeld deze testcase (eigenlijk voor een Opera bug bedoelt, maar demonstreert ook het IE-probleem)

on another note:
Cascading Stylesheet:
1
clip: rect(100px, 5px, 100px, 5px);

de specificatie zegt:

rect(<top>, <right>, <bottom>, <left>) where <top> and <bottom> specify offsets from the top border edge of the box, and <right>, and <left> specify offsets from the left border edge of the box.
Als je top == bottom en left == right doet dan blijft er weinig over om te laten zien ;)
dit is gewijzigd in CSS 2 revisie 1 t.o.v. 2.0 - het kan dus goed zijn dat sommige sites het nog verkeerd uitleggen ;)

[ Voor 50% gewijzigd door crisp op 31-03-2006 20:26 ]

Intentionally left blank


  • tombo_inc
  • Registratie: December 2004
  • Laatst online: 16-12-2025
kijk dat lijkt er al meer op :). ik vond de parameters ook al raar. nu ik de werkelijke betekenis ken lukt het me wel. FF doet het goed, IE alleen niet. IE clipt niet maar laat gewoon alles zoals het was. dat ga ik nu eerst ff fixen. bedankt iig.

Microsoft Windows: A thirty-two bit extension and graphical shell to a sixteen-bit patch to an eight-bit operating system originally coded for a four-bit microprocessor which was written by a two-bit company that can't stand one bit of competition


  • Rowanov
  • Registratie: Februari 2004
  • Niet online

Rowanov

Kop eens wat anders...

niet wakker :(

[ Voor 94% gewijzigd door Rowanov op 31-03-2006 20:50 ]

Pagina: 1