Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Need help with css layout

Featured Replies

Hi everyone i am new to the forums and i have a question.

 

I am new to webdesign i know the basics css, html etc.

 

 

i am trying to create a website similar to the huffington post

 

This is how it looks like so far, i am happy with the layout

post-41892-0-61782300-1346067085_thumb.png

 

http://worldtimes.comoj.com/test2/ This is the link

 

ok so my question is how do i make the coluns content please help ?

 

post-41892-0-78757500-1346066998_thumb.png

I can give you an answer to your question, but I think you'll have an uphill struggle ahead of you if you need to ask it. The straight answer is, you just need to insert your content into the content div, but obviously how you do that will depend on how you want your content to be laid out. (i.e. 1/2/3 columns, column width/floating vs css3 columns etc.)

 

If I could make a recommendation, it would be to learn a good bit more about HTML/CSS before attempting anything as sophisticated as the Huffington Post. Ideally, you need to take the template you've downloaded and put it in the recycle bin. Get rid of it, it will only make things harder for you in the long run. Even if you are happy with the layout of your page, you don't know how your page works and so that template is like an anchor dragging you down and stopping you learning. What you should do is learn from the ground up how to make a website that looks like the template you downloaded. Once you know how to make it yourself, you'll have full control over its content and appearance. If there's one thing that's readily become apparent to me while picking up web-design, it's that there's no instant gratification, you simply must put the time in to learning it.

 

Eoin

  • Author

i didnt download the template i created it its my own work well except for the slide show

i didnt download the template i created it its my own work well except for the slide show

 

Ah ok man, sorry I just looked inside of your source file and saw the word template all over it, but you're quite right it's only the slider.

 

The most supported way of making columns is using CSS floats. At the moment you just have one div with an ID of box, you're going to need another two if you want a three column layout:

 

<div id = "content">

<div id = "box">

in

</div>

<div id = "midColumn"></div>

<div id = "rightColumn"></div>

</div>

 

Next you need to change your CSS to make the new divs move to the right hand side of your original Box div. You do this by telling them to float to the right in your CSS.

 

/* Your current CSS */

#box {

width:200px;

height:100px;

background:black;

margin-left:10px;

color:white; }

 

/* You then add something like: */

#midColumn {

float: right; /* <--- The important line */

 

width:200px;

height:100px;

background:yellow;

margin-left:10px;

color:white;

}

#rightColumn {

float: right; /* <--- The important line */

 

width:200px;

height:100px;

background:green;

margin-left:10px;

color:white;

}

 

Let me know how you get on!

 

Eoin

  • Author

thank you eon very much, it made it

 

This is how it looks now

 

post-41892-0-83882900-1346103132_thumb.png

 

ps i deleted the colours and made a fourth long column below the three.

 

I also duplicated them at least once.

 

thank you again for your help.

 

how can i enhance these columns make them look better etc ?

thank you eon very much, it made it

 

This is how it looks now

 

post-41892-0-83882900-1346103132_thumb.png

 

ps i deleted the colours and made a fourth long column below the three.

 

I also duplicated them at least once.

 

thank you again for your help.

 

how can i enhance these columns make them look better etc ?

 

Glad that you're getting the hang of it!

 

If your aim is for something like the layout of the Huffington Post, then you only actually need 3 columns. When you start putting information into your columns, for example images, headings and paragraph tags; the columns will expand downwards. Just bear in mind that you've set a fixed height for your columns, so once you have content in your columns you might want to remove the fixed height, or it will stop the columns expanding!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.