Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Eric Weiss
@eweiss17
for backgrounds where you don't want an image, someone else used this and looks like a good idea
@Bradkittle btw how to use the photos from unsplash, https://source.unsplash.com/ , scroll down to the 'Specific Photo' section
Ken Haduch
@khaduch
@Bradkittle - I found a page with interesting backgrounds, too - http://lea.verou.me/css3patterns/ - even if you don't use them, it's interesting to see the possibilities. Although that page seems to be empty, currently. Here is http://lea.verou.me/2011/04/css3-patterns-gallery-and-a-new-pattern/ an article about it... I'm looking for some other link to it.
Aga
@aga87
Hi, I'm building my first website which consists of more than one site. let's say i have index.html projects.html and contact.html. My question is: do i simply copy the head element and paste it into projects.html and contact.html ? or is it enough to have it just in the index.html ? Thanks
Ken Haduch
@khaduch
@aga87 - each page has to have the <head> section, if it is loading important things like your CSS, etc. If you are creating discrete pages, then I would say that you have to copy the head section into each.
Aga
@aga87
Thanks @khaduch Ken
CamperBot
@camperbot
aga87 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
:star2: 3730 | @khaduch |http://www.freecodecamp.org/khaduch
Aga
@aga87
by discrete pages do you mean contact.html? (in this example)
Ken Haduch
@khaduch
@aga87 - I was thinking more of a scenario where you are having pages generated by a server - using PHP or Node, where you might "build" the pages on the fly and include the head section, for example, so you only have to have it represented in one place. But the browser has to "see" the head section for each page, if each page is distinct. Another way to look at it is when you switch to one of the other pages, say, from index.html to contact.html, if you have things in the <head> section of index.html, and contact.html is an entirely separate page being loaded, then you would not have the <head> from index.html any longer, so you need to have it as part of the HTML that is rendering contact.html. If you did some other construction of the page, for example just make one page with all of the content in separate <div> or <section> elements, and then hide / display them separately, they could be using the same <head> because they would all be part of one HTML page. It is possible that someone will chime in with other options...
DMsalati
@DMsalati
@eweiss17 thats really cool
Ken Haduch
@khaduch
@Bradkittle - that link that I posted for the CSS3 patterns http://lea.verou.me/css3patterns/ seems to load fine on Chrome, not on Opera (at least not on windows 10)...
Aga
@aga87
thanks again @khaduch
CamperBot
@camperbot
:star2: 3731 | @khaduch |http://www.freecodecamp.org/khaduch
aga87 sends brownie points to @khaduch :sparkles: :thumbsup: :sparkles:
Aga
@aga87
Following from that- the website will consist of 7 sections - the common elements on each site is the navigation, a graphic displayed above the nav bar and the footer. So I created 7 .html files and I was going to copy paste all the common elements into each of my .html files. But now I am wondering whether it's a good practice to repeat the code like that? e.g. does it mean that my graphics will have to reload each time the user goes to a different section of this website? or should i do something along the lines @khaduch suggested? hiding/ displaying sections differently?
its a basic website - using only html and css
with perhaps some javascript at later stage
Gulsvi
@gulsvi
@aga87 Usually it is a bad idea to duplicate HTML - if you make a fix in one place, you have to duplicate that fix across all the duplicate content. This is a limitation of HTML and CSS - and where JavaScript comes in handy to generate the HTML for you.
When the JS is generating the HTML, you just need to make a fix in one place (in the JavaScript code)
Aga
@aga87
thanks @gulsvi
CamperBot
@camperbot
aga87 sends brownie points to @gulsvi :sparkles: :thumbsup: :sparkles:
:star2: 2601 | @gulsvi |http://www.freecodecamp.org/gulsvi
DMsalati
@DMsalati
Gulsvi
@gulsvi
@DMsalati Give your body element a height
Kaz Baig
@kbaig
@DMsalati It'll work if you remove bootstrap (which is throwing an error). See console for error message
Aga
@aga87
so that's why I haven't come across a topic on how to create a multi-page website in the html/css lessons? (i'm using w3school.com as well as codecamp). this topic should be covered in javascript tutorials?
Kaz Baig
@kbaig
@aga87 You just need a tags to connect the pages
Gulsvi
@gulsvi
@kbaig Are you sure? :) I don't think JS errors prevent CSS from working
Kaz Baig
@kbaig
@gulsvi Try it
Gulsvi
@gulsvi
body{
  background-image: linear-gradient( 135deg, #52E5E7 10%, #130CB7 100%);
  min-height: 100vh;
}
Aga
@aga87
(I realised that my approach was wrong for exactly the reason you described @gulsvi .. having to correct all the files
Gulsvi
@gulsvi
@kbaig Still no background because the body has no height
@aga87 Yes, maintainability is important - saves a lot of time and headaches down the road
Gulsvi
@gulsvi
@kbaig Bootstrap css is not throwing an error though - yeah, if you remove the Bootstrap CSS, it works.
This person obviously wants to use bootstrap though :)
DMsalati
@DMsalati
@gulsvi what should i put in height ?
@kbaig but what if i still want to use bootstrap for other stuff?
Kaz Baig
@kbaig
I'm not knowledgeable about bootstrap, but you should be able to override its styling
Gulsvi
@gulsvi
body{
  background-image: linear-gradient( 135deg, #52E5E7 10%, #130CB7 100%);
  min-height: 100vh;
}
Kaz Baig
@kbaig
@gulsvi Is that a bootsrap thing? That you need to add a min-height
You don't under normal circumstances
Gulsvi
@gulsvi
Yeah, bootstrap includes it's own normalize.css
Kaz Baig
@kbaig
ohh it's a normalize thing
Gulsvi
@gulsvi
which sets up different defaults to "normalize" it across all browsers
Kaz Baig
@kbaig
gotcha
Gulsvi
@gulsvi
That jQuery missing error will prevent bootstrap javascript from working, but won't affect CSS
(still a good idea to get dependencies sorted @DMsalati - jquery needs to be listed before bootstrap.js in the settings)
DMsalati
@DMsalati
@gulsvi whats normalize ? and thank you for your help with the background