Solved

jQuery DIV box colors and sizes

Posted on 2016-09-12
8
65 Views
Last Modified: 2016-09-12
I had this question after viewing jQuery Generalization.

Can I ask you one variation?  How can I have the appearing DIV to show a border of say n Pixels thick and a specified color.
0
Comment
Question by:Howard Bash
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 41794203
Try this
Assuming the code from the sample in the referred question you can try adding this to your CSS
.main-menu + div {
  display: none;
  border: 3px solid black; /* ADD BORDER */
  overflow: hidden;  /* MAKE BOX EXTEND AROUND ALL CONTENT */
}

Open in new window

0
 
LVL 1

Author Comment

by:Howard Bash
ID: 41794226
Would it be possible to have the box rounded?  Also,  it seems that the boxes have more height than the contents require.  Is that something in my DIVs and/or can that be made dynamic?
0
 
LVL 1

Author Comment

by:Howard Bash
ID: 41794265
I think I got it!
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41794306
rounded box
add
.main-menu + div {
  display: none;
  border: 3px solid black; /* ADD BORDER */
  border-radius: 10px;
  overflow: hidden;  /* MAKE BOX EXTEND AROUND ALL CONTENT */
}

Open in new window

0
 
LVL 1

Author Comment

by:Howard Bash
ID: 41794318
Yes.  I have that now.  Thanks...
You're an HTML/CSS GURU!!!!

Can you point me at any tutorials/books/URLs where I can develop my HTML/CSS skills?

Thanks,
H
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 41794352
I don't personally have any I can recommend. I mainly use online resources W3Schools / MDN etc.
0
 
LVL 1

Author Closing Comment

by:Howard Bash
ID: 41794359
Great
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 41794507
You are welcome.
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
allow link tag to be submit like form 15 52
Bootstrap NavBar Not Working 2 27
center div inside another div 2 29
Jquery syntax 12 23
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question