Solved

jQuery DIV box colors and sizes

Posted on 2016-09-12
8
52 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:hbash
  • 4
  • 4
8 Comments
 
LVL 52

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:hbash
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:hbash
ID: 41794265
I think I got it!
0
 
LVL 52

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:hbash
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 52

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:hbash
ID: 41794359
Great
0
 
LVL 52

Expert Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

947 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now