ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Quick CSS Question!

December 11, 2007 2:33am

Subscribe [5]
  • #1 / Dec 11, 2007 2:33am

    ccachor

    18 posts

    Hello,

    I have a quick question about a project I’m working on. Basically I need to make a site with several different templates but I am not sure about CSS positioning. If I want the DIV layout in my view to be the same but reposition elements in CSS am I only able to use absolute positioning? I was hoping I could get away with using a fixed width layout and using margins change layouts wherever I need to. Please offer some suggestions.

  • #2 / Dec 11, 2007 4:57am

    xwero

    4145 posts

    I’m not really sure what you want to do but if you talking about different layouts for different pages with the same base html it’s not a problem. Just change the css link dynamically.

  • #3 / Dec 11, 2007 6:21am

    ejangi

    220 posts

    I’m not sure whether you’re wanting to know how to simply create columns with CSS or switch the layout for the page you’re viewing (without hampering with the html)???

  • #4 / Dec 11, 2007 12:00pm

    ccachor

    18 posts

    Sorry let me explain a bit more. For example my page would look like this in html

    <html>
    <head>
    <title>Example</title>
    </head>
    
    <body>
    <div id="menu">Menu Here</div>
    <div id="header">Header</div>
    <div id="content">
    Content
    </div>

    Now what happens if I want to reposition the page in CSS so that the menu would be BELOW the header if needed? I know its possible to move DIV elements around on the page with absolute positioning, but I’m curious if there is another way to do this? Possibly with margins, etc.

    Shopify themes looked like they accomplished this with margins but it still looked funky.

  • #5 / Dec 15, 2007 6:43pm

    JamesD

    26 posts

    CSS can be tricky especially with the newer standards and many browsers available today.

    So, if you are unsuccessful at finding an answer… I would recommend checking out the info on CSS at the W3 Schools site:
    http://w3schools.com/css/css_positioning.asp

    Love this site, they’ve grown and have expanded so much over last few years. W3 Schools is an awesome site with a wealthful of knowledge in many respects.

  • #6 / Dec 15, 2007 10:00pm

    Nick Husher

    364 posts

    Just generally, the specific thing you’re asking for is quite difficult to do well. Absolute positioning of one form or another is usually the best way to go about it, unfortunately.

  • #7 / Dec 27, 2007 8:59pm

    groovywd

    4 posts

    If you did decide to go with absolute positioning, you might as well reorder your html so hat your main content is closest to the top of the page, for best search results:

    <html>
    <head>
    <title>Example</title>
    </head>
    
    <body>
    <div id="content">
     Content
    </div>
    <div id="menu">Menu Here</div>
    <div id="header">Header</div>
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases