Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-09-2010, 06:31 AM   PM User | #1
mobotech
New Coder

 
Join Date: Dec 2009
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
mobotech is an unknown quantity at this point
Is their a more efficient way of coding this in css?

I was looking at this pixel border tutorial here: http://www.stockvault.net/tutorials/...reamweaver.php

I've turn that table menu into a working css menu. But my way of doing it seems like its more than it should be.

Is their a better way of creating this menu in css without using as many div's and css coding as I have?

Here's my version: http://htmlnewbie.x10hosting.com/pixelmenu/
mobotech is offline   Reply With Quote
Old 01-09-2010, 07:33 AM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Quote:
Is their a better way of creating this menu in css without using as many div's and css coding as I have?

Here's my version: http://htmlnewbie.x10hosting.com/pixelmenu/
I don't see any menu in that link.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-09-2010, 07:45 AM   PM User | #3
mobotech
New Coder

 
Join Date: Dec 2009
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
mobotech is an unknown quantity at this point
Ok, not menu, box with scrollbar.
mobotech is offline   Reply With Quote
Old 01-09-2010, 07:56 AM   PM User | #4
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Code:
.box_outer{
border:1px solid #000;
background:#cdcdcd;
margin:0 auto;
padding:5px;
width:252px;
font-size:12px;
line-height:1.6;
}
.box_inner{
background:#e6e6e6;
border:1px solid #000;
overflow:auto;
height:166px;
padding:10px;
}
Code:
<div class="box_outer">
 <div class="box_inner">
	Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
 </div>
</div>
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-09-2010, 08:33 AM   PM User | #5
mobotech
New Coder

 
Join Date: Dec 2009
Posts: 13
Thanks: 4
Thanked 0 Times in 0 Posts
mobotech is an unknown quantity at this point
Thanks for the alternative, but actually I wanted to use the images that were in the tutorial, because it has a white top and bottom border if you look closer (pixel border).

I thought hmmm, maybe I can add a border and use the outline property, but than that would only border all around.

I just wanted to see if their was another way to use those image borders.
mobotech is offline   Reply With Quote
Old 01-09-2010, 08:38 AM   PM User | #6
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
In any standard browser, you could make those borders better by specifying inset/outset instead of solid style. Say,
Code:
.box_outer{
border:1px outset #000;
background:#cdcdcd;
margin:0 auto;
padding:5px;
width:252px;
font-size:12px;
line-height:1.6;
}
.box_inner{
background:#e6e6e6;
border:1px inset #000;
overflow:auto;
height:166px;
padding:10px;
}
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Users who have thanked abduraooft for this post:
mobotech (01-11-2010)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:51 PM.


Advertisement
Log in to turn off these ads.