1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Responsive layouts

Discussion in 'CSS' started by Karolwf, Dec 22, 2016.

  1. #1
    Karolwf, Dec 22, 2016 IP
    SEMrush
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    8,500
    Likes Received:
    1,515
    Best Answers:
    223
    Trophy Points:
    515
    #2
    Doesn't really look anything like how I'd write code, with the lack of media targets, media="all", epic failure at scripttardery, clearing DIV like it's still 2003, pixel metric fonts, illegible colour contrasts, advert before you even have your page heading, blocking scripts in the <head>...

    The lack of code formatting in the HTML makes it hard to tell what section is what -- I'm heading to bed soon (that pesky non-24 sleep wake disorder caught up with me again) but I'll run the code through some formatting and see if there are any tell-tales for what may have gone awry when I get a chance... but a quick check in the document inspector and...

    You're floating #sidebar, but NOT #main. If anything the floats should be on the FIRST element, not the second, or a double-wrapping DIV is needed to use the negative margin technique floating BOTH. The former method works if going for a percentage width, the latter is better if content first with elastic width. (em).

    See how in the page you were copying from the floated part (#extras) is FIRST in the code, not second? That's so all I had to do is float #extras and then set #content to overflow:hidden so it didn't de-indent beneath it. Swap your code order would be the SIMPLER approach, but not necessarily in the case of the page you are working on one that makes any sense semantically -- so more complex layout methods may need to be used there.
     
    deathshadow, Dec 22, 2016 IP
  3. Karolwf

    Karolwf Active Member

    Messages:
    98
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    60
    #3
    This is maybe 10 yrs old template with no responsive layouts. I know this is a mess.
    Tried another CSS (part of course)
    http://www.cutcodedown.com/for_others/ultimate/template.html

    So I have sidebar and "Main" div in right places.
    http://www.furniturefinder.biz/store2/

    I'm using part of yours CSS with div "ContentWrapper" here:
    http://www.furniturefinder.biz/furniture/

    Had to add extra divs to 5 pages.

    But it causes problems in main page of website. Wasn't able to add closing </div> to right place and one page was broken.

    So I'm looking for CSS without re-writting Divs.

    Best Regards.
     
    Last edited: Dec 22, 2016
    Karolwf, Dec 22, 2016 IP
  4. Karolwf

    Karolwf Active Member

    Messages:
    98
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    60
    #4
    Karolwf, Dec 29, 2016 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,377
    Likes Received:
    342
    Best Answers:
    26
    Trophy Points:
    335
    #5
    Don't specify the height, and it will maintain its aspect ratio automagically.

    gary
     
    kk5st, Dec 30, 2016 IP