Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Directory Submission Service   ClickBooth Network   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 10-17-2004, 11:22 AM   #1 (permalink)
Junior Member
 
Join Date: 06-30-04
Location: Long Island, NY
Posts: 26
iTrader: 0 / 0%
mortgage-pro-seo is on the right pathmortgage-pro-seo is on the right pathmortgage-pro-seo is on the right path
Create Boxes With CSS

Please have a look at the attachment. What is the easiest way to make this box in just css?

I don't care about the rounded corners because that is more advanced. Just the plain square box for now.

Is there a site with tutorials on creating boxes around elements?
Attached Thumbnails
create-boxes-css-color-box.png  
mortgage-pro-seo is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 10-17-2004, 12:22 PM   #2 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
you mean give the element a square border?
Code:
border: solid black 1px;
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-17-2004, 12:39 PM   #3 (permalink)
Junior Member
 
Join Date: 06-30-04
Location: Long Island, NY
Posts: 26
iTrader: 0 / 0%
mortgage-pro-seo is on the right pathmortgage-pro-seo is on the right pathmortgage-pro-seo is on the right path
Hiya Lazyjim,

I am speaking about making a box look like the image which I posted.
mortgage-pro-seo is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-17-2004, 01:23 PM   #4 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
ah ha

well start with a div and set its class to something useful that we can use to reference the box in the CSS code.
Code:
<div class="bluebox"> </div>
wherever your CSS is, add a rule for our blue box, make the bg lightblue (or whatever) and maybe specify a size...
Code:
div.bluebox { background: lightblue; width: 260px; }
now add the box heading, assuming you've got 2 levels of heading in the page already, add a third level heading...
Code:
<div class="bluebox"> <h3></h3> </div>
you can reference the heading with a new rule in your CSS (and also make it whatever colour you want)...
Code:
div.bluebox { background: lightblue; width: 300px; height: 200px; } div.blue_box h3 { background: blue; margin: 0px; padding: 5px; text-align: center; }
Now you can add <p> paragraphs for the next boxes, give one (I've done the white one) a class so you can provide different CSS to <p>'s that have that class.

Here's the whole lot hope it's the sort of thing you were after:
Code:
<html> <head> <style> div.blue_box { /* Our blue boxes */ background: lightblue; width: 260px; } div.blue_box h3 { /* level 3 headings inside our blue boxes */ background: blue; margin: 0px; padding: 5px; text-align: center; } div.blue_box p.white_box { /* the white box pragraph in our blue boxes */ background: white; margin: 5px; padding: 5px; text-align: left; } div.blue_box p { /* ordinary paragraphs in our blue boxes */ padding: 5px; text-align: left; } </style> </head> <body> <div class="blue_box"> <h3>Box Title or image</h3> <p class="white_box"> white box content here with links and whatever </p> <p>Have one to sell? [Image]</p> </div> </body> </html>
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-17-2004, 01:59 PM   #5 (permalink)
Junior Member
 
Join Date: 06-30-04
Location: Long Island, NY
Posts: 26
iTrader: 0 / 0%
mortgage-pro-seo is on the right pathmortgage-pro-seo is on the right pathmortgage-pro-seo is on the right path
Thanks Lj!

That did get the juices flowing!
mortgage-pro-seo is offline  
Add Post to del.icio.us
Reply With Quote
Old 10-18-2004, 07:25 AM   #6 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,819
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to allLazyJim is a name known to all
Send a message via MSN to LazyJim
If you mean I helped you out and you learned something in the process then great!
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Boxes of life--- Heaven nikklemomo Graphic Design Forum 9 03-18-2008 04:14 PM
My CSS Boxes not working in I.E - Why??? swiftmed Coding Forum 1 10-08-2007 09:32 AM
Getting Quote Boxes To Fade SteveG36 Coding Forum 9 07-06-2006 07:20 AM
Search Boxes RingingPHoneML Web Usability 2 06-10-2004 01:50 PM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog


All times are GMT -7. The time now is 07:55 PM.
© Copyright 2008 V7 Inc