Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. dsonesuk

    Controlling a Column Width

    Span is inline, inline element don't act upon width or height unless converted to block element.
  3. ben03

    Controlling a Column Width

    Hi there, I have been trying set a width of the last column in a table to 200px. <div class="table"> <div class="table-row"> <div class="table-cell">data</div> <div class="table-cell">data</div> <div class="table-cell"><span>data</span></div> </div> </div> .table{display: table;} .table-row{display: table-row;} .table-cell{display: table-cell;} .table-cell span{width: 200px;} Setting .table-cell:last-child to 200px causes strange behaviour with the height of the cells (this matters as a certain row is highlighted). Setting a width on the span solves the cell height issue, but the table still distributes the available space to each column evenly, so the last column is its natural width, plus 200px making it pretty wide. Is there a way to stop this last column filling out and remaining at 200px? Thanks.
  4. Yesterday
  5. dsonesuk

    youtube example about Grid

    That's the default action on using max-width: with a image, it will expand to its original size and not beyond, you need to use width: 100%; height: auto; to expand proportionately or width: 100%; height: 100%; to fill the area available to it.
  6. luuis

    youtube example about Grid

    It doesnt say just pdf files are limited, but any file.So, 160kb available it has worked for this file. What also doesnt work is managing images. Right now, the union jack I have here, is very small, if I take a larger one it doesnt fit the space as supposed to be, its always originally size.
  7. dsonesuk

    Grid Layout: place-self

    Its still relatively new with a update this month, so until its has more support maybe they decided not to show it within the tutorial.
  8. sgt_spike

    Grid Layout: place-self

    I know what it is and how it's used. I was suggesting adding it to the grid tutorial, however I also wanted to make sure it exist.
  9. justsomeguy

    Force data into unique row format

    You'll need to get the list of IDs and names and figure out which one to use, and just insert that data into the new table.
  10. justsomeguy

    Grid Layout: place-self

    https://developer.mozilla.org/en-US/docs/Web/CSS/place-self
  11. jonnytekno

    Force data into unique row format

    I have marketing campaign some data where there is a unique campaign id and then a campaign name. But, there can sometimes be more than one campaign name for a single campaign id - this means joining the campaign name to other data where the campaign id exists is hard. I want to be able to force the data into a table where the campaignid and campaign name are always unique, which means I need to drop one of the campaign names, but don't care which (they are practically identical apart from typos etc) How can I do a select id, name from [table] group by id, name where I know that the id is never going to be duplicated?
  12. sgt_spike

    Grid Layout: place-self

    I didn't see a reference to place-self for grid items in the CSS-Reference. Is there such a property? CSS Tip and Tricks seem to think so. They mention it in their Gird guide here.
  13. dsonesuk

    youtube example about Grid

    Then give us a clue what the specific problem is, were not mind readers. It won't look exactly like youtube because it is working to a narrower viewport width, you are using 1fr 5fr compared to 1fr 3fr, he's using different fonts using css variables. If you can't add pdf, then try using what everyone else uses and what it mentions using, a IMAGE.
  14. luuis

    youtube example about Grid

    twice times yesterday I added a pdf file. I waited each time till its say's done. Today its not possible cause it says just 163kb allowed. The text within the aside tag doesnt mean any. In the first place I had just some letters, but did not mean any for the page.
  15. Last week
  16. dsonesuk

    youtube example about Grid

    IF! You are talking about column widths of column main and aside, its probably due the excessively long worded text in aside element, so it accommodates to the width of this text and not the column width set by using grid layout. What pdf? Some editors have Latin generates built in or you can download or use a online generator.
  17. luuis

    youtube example about Grid

    I picked the code from this youtube video(https://www.youtube.com/watch?v=v5KzBPUEgGQ), but my page doesnt look as the video shows it(no matter what browser). I added a pdf file, it shows how the page looks like. I looked over and over to see if I missed anything. My intencion, whenever I go through such videos, is, to get it work and then to analyze the things. So, maybe someone sees whats left or whats wrong. <!DOCTYPE html> <html> <head> <title>supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <header> <h1 class="header-Title"> Header CSS Grid Templat Area </h1> </header> <div class="hero">HERO AREA <div class="hero-title">hero-title Grid-Areas</div> <p class="hero-subtitle">hero-subtitle making life easier</p> </div> <main> <h1>main starts from the blog </h1> <div class="card"> <img src="GB.jpg" alt="foto" class="card-img"> <h2 class="card-title">blog post title</h2> <div class="card-content"> <p>text ljvslvhöh psoupsdhp bölabvnta</p> </div> <a href="">read more</a> </div> </main> <aside> <h1>sidebar stuff</h1> <p>kvdldghldfghf kvdldghldfghfkvdldghldfghfvkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghfkvdldghldfghfvvkvdldghldfghfkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghf kvdldghldfghfkvdldghldfghfvkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghfkvdldghldfghfvvkvdldghldfghfkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghf kvdldghldfghfkvdldghldfghfvkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghfkvdldghldfghfvvkvdldghldfghfkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghf kvdldghldfghfkvdldghldfghfvkvdldghldfghfkvdldghldfghfkvdldghldfghf kvdldghldfghfkvdldghldfghfvvkvdldghldfghfkvdldghldfghfkvdldghldfghfkvdldghldfghf</p> </aside> <footer> <h1 class="footer-Title"> footer</h1> </footer> </body> </html> /*https://www.youtube.com/watch?v=v5KzBPUEgGQ*/ body{ background-color: transparent; /* @include font-base; */ line-height: 1.6; display: grid; /* grid-template-rows: 10em 50vh auto 10em; grid-template-columns: 1fr 5fr 2fr 1fr;*/ grid-template: "header header header header" 10em "hero hero hero hero" 50vh ". main sidebar ." auto "footer footer footer footer" 10em / 1fr 5fr 2fr 1fr; } header{ grid-area: header; } header,footer{ display: flex; background-color: yellow; justify-content: center; align-items: center; } .header-Title, .footer-Title{ background-color: red; font-size: 1.0rem; } .hero{ background-color: coral; grid-area: hero; /* background-image: url('SCL90R_GraphBig.png');*/ background-repeat: no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center; } aside{ grid-area: sidebar; background: #fff; } footer{ grid-area: footer; } main{ background-color: red; grid-area: main; } .card{ display: grid; /* grid-template-columns: 1fr 3fr; grid-template-rows: min-content auto; grid-template-areas: "img title" "img content";*/ grid-template: "img title" min-content "img content" auto / 1fr 5fr; } .card-img{ grid-area: img; max-width: 100%; background-color: pink; } .card-title{ grid-area: title; background: lightblue; } .card-content{ grid-area: content; background: lightgreen; }
  18. justsomeguy

    Issue extending class

    Put a constructor in ThirdClass.
  19. Mad_Griffith

    Issue extending class

    I just noticed I am in a conundrum. in firstMethod() I am also setting the value of a few SecondClass' variables that I want to be accessible in ThirdClass, but which of course is not set in ThirdClass if I either add the check in the SecondClass' constructor or override the constructor in ThirdClas. How do I overcome that? Thank you.
  20. Mad_Griffith

    Issue extending class

    uhm, I get your points. What do you think of this solution? firstMethod() is actually just a init function containing stuff that SecondClass won't share with any other class. public function __construct() { if (get_class($this) !== 'SecondClass') return; $this->firstMethod(); }
  21. justsomeguy

    Issue extending class

    The constructor is only inherited if you don't define one, so the solution is to define a constructor. If you have a constructor and want to call the parent constructor explicitly you can use parent:: for that. That is often the case, but the parent constructor is not called automatically because sometimes you want to parent constructor to run either before or after the child constructor, so that behavior is left up to the programmer to do explicitly. So the behavior you are expecting is the default behavior when you have a constructor. Therefore, it sounds like the solution is to make a constructor.
  22. luuis

    font size 62%

    Thanks for answer, havnt expected anymore. If your "Why does this matter? " is refered to "1.4 rem are not 14px", then I say: Well, I'm still alive, but hopefully that I just missed or mixed something of the description. Cause as I said from the beginning, using 62% is explained this way.
  23. Funce

    Issue extending class

    No worries, but if you put a check in SecondClass, you're undermining the point of using classes. It makes SecondClass on its own (and anything else that inherits from it) have more baggage.
  24. Mad_Griffith

    Issue extending class

    ThirdClass is something I would like to keep clean, if possible. I will put a check on the class in SecondClass' constructor. Anyway, thank you, I didn't know constructors are inherited.
  25. Funce

    Issue extending class

    Empty constructors aren't inherently bad. I wouldn't see an issue with it.
  26. Mad_Griffith

    Issue extending class

    You're right, that's the issue. How can I avoid this in such a way that I am not forced to put an empty constructor in ThirdClass? Should I just use a check on the class in the SecondClass' constructor or is there a better solution?
  27. Funce

    Issue extending class

    Would the ThirdClass be inheriting the SecondClass' constructor, and infinitely trying to make new instances of ThirdClass?
  28. Mad_Griffith

    Issue extending class

    It's the bare bone of my code and all I am getting is what appears to be an infinite loop.
  1. Load more activity
×