Website Width Help

hasithapriya111

Active member
  • Sep 1, 2010
    440
    54
    28
    Machan website width eka dynamically change wena widiyata set karanna widiyak tiyenawada? Screen size ekat ekka width eka change karanne kohomada? Api CSS walin fixed width ekak dunnot samahara welawata laptop screens wage podi screen walin view karanakota site eka godak lokuwata penawa. samahara welawata scroll karannat wenawa. Mata 1200px width web page ekak hadanna one screen eke width ekat ekka automatically change wena widiyata. Ehema widiyakk tiyenawada?
     

    Budhajeewa

    Member
    May 20, 2007
    15
    2
    0
    Make sure all the content of the website is in a main DIV, and give that dev the max-width of 1200 px, that will stop the DIV from being larger than that size. Then set a margin for left and right, so that the content won't "touch the browser edges". Set the width as 100% - that will make the DIV utilize all available screen space, less the specified margin.

    I think that's it.

    If you want to ensure that this DIV won't become too small, give it an appropriate min-width too.

    That being said, if you are looking to truly make your website responsive, I suggest you use Twitter Bootstrap. You can switch to that if you haven't done too much already manually for your website structure.

    All the best!
     
    Last edited:

    ganidu94

    Well-known member
  • Dec 16, 2010
    989
    160
    63
    localhost
    elements walata width denakota percentage ekak widihata denna . ex :

    body { width :100%; }
    main-container { width : 80%; }

    ubata thawa CSS3 Media Queries use karala specific sizes walata site eka responsive wena widihata hadaganna puluwan .
    .
    Mama kiyanne Responsive Framework ekak igenaganna eka hodai kiyala
     

    hasithapriya111

    Active member
  • Sep 1, 2010
    440
    54
    28
    Thanks Everybody for helping me regarding this. It is really nice reading your replies. But I have already created the design. And I used CSS 3 Media quarries for this. Can anybody help me to check my code and whether it is under current web standard.